Does a Primary Key always have stats_id 1?
Back to the SQL Server Basics with Wayne
The Myth
I recently was attending a presentation where the presenter stated that the...
2018-07-09 (first published: 2018-06-28)
2,442 reads
Back to the SQL Server Basics with Wayne
The Myth
I recently was attending a presentation where the presenter stated that the...
2018-07-09 (first published: 2018-06-28)
2,442 reads
SSMS is a wonderful tool. You can drag Windows around, grouped with others, split, docked, undocked, hidden… it seems endless...
2018-07-02 (first published: 2018-06-20)
4,769 reads
New SQL blogger
Jamie at the 45th Parallel (South) – New Zealand
This post is just a quick shout-out. My friend and co-leader...
2018-06-15
343 reads
Comparison of the new methods of splitting strings in SQL Server 2016 to the tried and true methods
2018-06-15 (first published: 2016-04-12)
9,495 reads
Killing Time – or removing the time element from a datetime
Over the course of time, we all collect scripts and routines...
2018-06-07
2,089 reads
One of the things that you will no doubt end up experiencing as a DBA is that you will see...
2018-05-16
1,983 reads
SSMS (and other SQL Server utilities) utilize a batch separator to, well, separate batches of T-SQL statements. Before we go...
2018-04-18
2,108 reads
Database Code Smells
I was recently reviewing a newly created T-SQL stored procedure. This procedure was verifying temporary table existence with...
2018-04-11
2,357 reads
This post talks about having primary replica jobs. That is, jobs that will only run on the primary replica of...
2018-04-02
1,005 reads
There are several different options available for working with tabs and spaces in SSMS. In fact, there are enough that...
2018-03-29 (first published: 2018-03-21)
2,953 reads
By SQLPals
Why sys.fn_dblog Is Undocumented And Why It's Still There Why sys.fn_dblog...
When I put together the invitation for T-SQL Tuesday #202, I wasn't sure what...
By Steve Jones
My life has some crazy travel stretches for sure. Between speaking, office visits, customer...
Comments posted to this topic are about the item Implementing Type 4 Slowly Changing...
Comments posted to this topic are about the item The Disabled Index
Comments posted to this topic are about the item Server-Level Table sizes
I run this code on SQL Server 2022.
CREATE TABLE Drink
(
drinkid INT NOT NULL
CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
drinkname VARCHAR(20),
rating NUMERIC(2, 1)
)
GO
INSERT INTO Drink
(
drinkid,
drinkname,
rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result? See possible answers