CTE in SQL Server Examples
In this article we cover what a Common Table Expression CTE is and how to write a CTE for doing selects, inserts, deletes, updates and more.
2021-06-02
In this article we cover what a Common Table Expression CTE is and how to write a CTE for doing selects, inserts, deletes, updates and more.
2021-06-02
As SQL developers, we tend to think of performance tuning in terms of crafting the best table indices, avoiding scalar and table valued functions, and analyzing query plans (among other things). But sometimes going back to the spec and applying some properties of elementary math can be the best way to begin to improve performance of SQL queries which implement mathematical formulas. This article is a case study of how I used this technique to optimize my SQL implementation of the Inverse Simpson Index.
2021-05-07 (first published: 2019-09-12)
5,342 reads
This script features as we can through the CTE Top10FilesWithLargerDiskConsumption the top ten data files that are showing greater consumption of hard drive related data-reading activities.
2019-01-15 (first published: 2019-01-08)
1,016 reads
2018-07-12
1,133 reads
A fun exercise, using CTEs to implement John Conway's Game of Life cellular automata simulation
2018-02-19 (first published: 2015-09-22)
6,514 reads
2015-04-28
1,742 reads
Cursors are considered by many to be the bane of good T-SQL. What are the best ways to avoid iterative T-SQL and to write queries that look and perform beautifully? This first part in an ongoing series of cursor-killing handles inter-row analysis.
2015-12-18 (first published: 2014-05-27)
22,608 reads
2013-09-25
2,967 reads
2013-09-17 (first published: 2013-09-06)
1,438 reads
Finding circular references that are stopping your CTE from working.
2013-09-02 (first published: 2011-01-31)
19,035 reads
By Will Assaf
I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...
Database administrators (DBAs) are the backbone of data-driven organizations. If you're looking to break...
By Brian Kelley
Another security fundamentals topic is authentication versus authorization. For those who have a clear...
Comments posted to this topic are about the item The Backup File Extension
Comments posted to this topic are about the item Ingest and Retrieve data from...
Comments posted to this topic are about the item The DBAccountant
I run this command in SQL Server 2022. What is the extension of the backup file?
BACKUP DATABASE HerdofTwo TO DISK = 'HerdOfTwo_20240501'See possible answers