What happens when we drop a column on a SQL Server table? Where's my space?
You have dropped a column and wondering why you haven't recovered any space? Let's take a look.
2024-08-01 (first published: 2024-04-26)
3,480 reads
You have dropped a column and wondering why you haven't recovered any space? Let's take a look.
2024-08-01 (first published: 2024-04-26)
3,480 reads
Check how much space you may expect to recover from a rebuild after dropping a column!
2024-07-05
1,106 reads
How easily can we find tables with dropped columns that need cleanup?
2024-06-07
1,995 reads
Here you will learn about the key differences between the binary and SQL/Windows collations. You will see that even with all sensitivity flags enabled, SQL/Windows collation cannot behave the same way as the binary collations.
2024-03-15
1,409 reads
Dive deep into the powerful SQL window functions, LAG() and LEAD(). Explore their intricacies, discover real-world examples, and avoid common pitfalls.
2023-12-11
6,040 reads
Learn how to use CTEs through the use of a number of examples.
2023-10-20
9,575 reads
I need to convert an integer to a string value, what options are available in Microsoft SQL Server with T-SQL scripts and stored procedures?
2023-09-22
To move a table into a schema in T-SQL, you can use the ALTER SCHEMA statement along with the TRANSFER option. Here are the steps to do this: Assuming you have an existing schema named "NewSchema" and a table named "YourTable" that you want to move into this schema: Open SQL Server Management Studio or […]
2023-09-29 (first published: 2023-09-18)
2,660 reads
I’ve long been a huge advocate for always referencing objects with a schema prefix in SQL Server.
In spite of what may be a controversial title to many of my regular blog readers, I don’t really want you to stop that practice in most of your T-SQL code, because the schema prefix is important and useful most of the time. At Stack Overflow, though, there is a very specific pattern we use where not specifying the schema is beneficial.
2023-09-13
Learn how to use the DatabasePropertyEX() function to query your database for settings.
2022-08-29
2,093 reads
Want to build a data analytics foundation that transforms raw data into valuable business...
By Steve Jones
Recently a customer asked if SQL Compare and SQL Data Compare can be used...
By Tim Mitchell
Earlier this month, I hosted the monthly T-SQL Tuesday invitation in which I asked,...
Comments posted to this topic are about the item Concatenating Multiple Row Values into...
Hi there, I've tried CROSS APPLY, PATINDEX and many other functions, but can't nail...
What is the best way to continually loop a SQL Server Agent Job? I...
I have some simple sales data in a SQL Server 2022 database that looks like this:
TransactionDate SalesAmount 2023-01-15 1200.00 2023-02-22 1500.50 2023-03-10 900.75If I run this query, what are the sales growth amounts returned?
SELECT ms.TransactionDate , ms.SalesAmount , ms.SalesAmount - LAG (ms.SalesAmount, 1) OVER (ORDER BY ms.TransactionDate) AS SalesGrowth FROM dbo.MonthlySales AS ms;See possible answers