One line to drop a (temp) table if it exists
It is very common to want to drop a table, if it exists, before creating it. This script does so, and it works well with temp tables (where the system views are harder to query).
2008-10-06
2,699 reads
It is very common to want to drop a table, if it exists, before creating it. This script does so, and it works well with temp tables (where the system views are harder to query).
2008-10-06
2,699 reads
2008-10-06
4,059 reads
Part 19 digs deep into two of SQL 2005's ranking functions: RANK() and DENSE_RANK(). It includes performance considerations and using CTEs to avoid table variables.
2008-10-06
3,629 reads
2008-09-30
3,655 reads
Sometimes we need to generate the data based on a given date, to an end date (data extrapolation).
This is a easy way to do that without any temporary storage.
2008-11-14 (first published: 2008-09-25)
897 reads
It is a simple routine that we all need to use occasionally; parsing a delimited list of strings in TSQL. In a perfect relational world, it isn't necessary, but real-world data often comes in a form that requires one of the surprising variety of routines that Anith Sen describes, along with sage advice about their use.
2008-09-24
5,751 reads
2008-09-23
3,801 reads
A useful user defined function for padding values from the left or right with any token, number, or character.
2008-11-07 (first published: 2008-09-13)
778 reads
What does ANSI_PADDING mean and how does it affect my SQL Server database?
2010-07-17 (first published: 2008-09-12)
25,353 reads
2008-09-10
4,464 reads
By Steve Jones
It’s that time of the month again, and once again, I’m late and I’m...
By Steve Jones
This is from 2010, but I loved that people felt this way about Redgate...
Yes, you’re reading that right, we’re going to download a report that cannot be...
Comments posted to this topic are about the item Poor Name Choice
Comments posted to this topic are about the item Getting the Indexed Columns
Comments posted to this topic are about the item T-SQL in SQL Server 2025:...
I run this code on SQL Server 2022 to get a list of all the indexes and their key columns. What is returned?
SELECT
INDEX_COL (N'AdventureWorks2017.Sales.SalesOrderDetail') See possible answers