What goes around comes around : T-SQL Tuesday #129
I almost died. I’m sure a lot of you already know this but just to be clear, I should have. ... Continue reading
2020-08-11
18 reads
I almost died. I’m sure a lot of you already know this but just to be clear, I should have. ... Continue reading
2020-08-11
18 reads
Demo first and then I’ll explain what happened. First thing I did was run this script: CreateUsers.bat It’s a quick ... Continue reading
2020-07-08 (first published: 2020-06-22)
397 reads
The development team has told me they’ve shut down the application, there are no more connections and I can go ... Continue reading
2020-06-30 (first published: 2020-06-11)
661 reads
It’s another HAL! Every once in a while (4 times now) I come up with a terrible terrible idea for ... Continue reading
2020-06-29
47 reads
I was thrilled to host TSQL Tuesday this month (#127) and I my prompt was non-SQL tips and tricks. Now ... Continue reading
2020-06-26 (first published: 2020-06-16)
494 reads
I was working on a couple of Azure databases the other day. One was an Azure SQL DB and the ... Continue reading
2020-06-24
165 reads
I blog a fair amount and do you want to know what the most annoying part of the process is? ... Continue reading
2020-06-18
18 reads
Triggers. Blech. Triggers are a really really cool feature of SQL Server, that are continuously misused and cause all kinds ... Continue reading
2020-06-18 (first published: 2020-06-04)
335 reads
I was thinking about the story The boy who cried wolf earlier today and realized that it has some lessons ... Continue reading
2020-06-12 (first published: 2020-05-28)
477 reads
Happy T-SQL Tuesday! Number 127. Wow. Over 10 and a half years. Talk about incredible. I’m actually hosting this time ... Continue reading
2020-06-09
67 reads
The slidedeck and the SQL scripts for the session Indexing for Dummies can be...
By Chris Yates
Change is not a disruption in technology; it is the rhythm. New frameworks appear,...
No Scooby-Doo story is complete without footprints leading to a hidden passage. In SQL...
Comments posted to this topic are about the item Don't Forget About Financial Skills
Comments posted to this topic are about the item Building a Simple SQL/AI Environment
Comments posted to this topic are about the item Checking Identities
The DBCC CHECKIDENT command is used when working with identity values. I have a table with 10 rows in it that looks like this:
TravelLogID CityID StartDate EndDate 1 1 2025-01-11 2025-01-16 2 2 2025-01-11 2025-01-16 3 3 2025-01-11 2025-01-16 4 4 2025-01-11 2025-01-16 5 5 2025-01-11 2025-01-16 6 6 2025-01-11 2025-01-16 7 7 2025-01-11 2025-01-16 8 8 2025-01-11 2025-01-16 9 9 2025-01-11 2025-01-16 10 10 2025-01-11 2025-01-16The docs for DBCC CHECKIDENT say this if I run with only the table parameter: "If the current identity value for a table is less than the maximum identity value stored in the identity column, it is reset using the maximum value in the identity column. " I run this code:
DELETE dbo.TravelLog WHERE TravelLogID >= 9 GO DBCC CHECKIDENT(TravelLog, RESEED) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-09-14', '2025-09-17') GOWhat is the identity value for the new row inserted by the insert statement above? See possible answers