Detecting SQL code smells using code analysis
Watch out, watch out, there's a NOLOCK hint about. And probably a few other SQL code smells.
2018-07-02
422 reads
Watch out, watch out, there's a NOLOCK hint about. And probably a few other SQL code smells.
2018-07-02
422 reads
Steve Jones talks about the practical benefits of using DevOps to smooth out your software development.
2018-07-02
170 reads
Steve Jones asks about your plans to get away from work and refresh yourself.
2018-06-29
68 reads
This is an error that has plagued SQL Server for a long time. It should be fixed.
2018-06-28
356 reads
Work sometimes gets in the way of work. Steve Jones notes this can cause stress and problems over time.
2018-06-27 (first published: 2014-10-21)
232 reads
2018-06-26 (first published: 2015-04-14)
282 reads
2018-06-25 (first published: 2015-02-13)
202 reads
2018-06-25
76 reads
This week Steve Jones is wondering what the common mistakes that T-SQL developers make are.
2018-06-22 (first published: 2015-03-20)
538 reads
2018-06-21
156 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