Long names vs short names (or aliases)
I remember when I was first learning to code there was always the argument of how long a name should ... Continue reading
2021-06-30 (first published: 2021-06-15)
971 reads
I remember when I was first learning to code there was always the argument of how long a name should ... Continue reading
2021-06-30 (first published: 2021-06-15)
971 reads
You’d be amazed (or maybe you wouldn’t) how often I hear this: “I used to be able to do xyz ... Continue reading
2021-06-22
119 reads
I love CROSS APPLY. I also love OUTER APPLY. What’s the difference though? The same difference as with an INNER ... Continue reading
2021-06-21 (first published: 2021-06-10)
1,400 reads
One of my favorite people is hosting TSQL Tuesday this month. Ben Weissman (blog|twitter). He wants us to talk about ... Continue reading
2021-06-18 (first published: 2021-06-08)
274 reads
A while back (almost 7 years ??) I wrote a post on finding the common AD groups of a set ... Continue reading
2021-06-17
112 reads
Last month I had you work on Extended Events, so hopefully now you are a bit more comfortable with them. ... Continue reading
2021-06-14 (first published: 2021-06-01)
286 reads
I recently gave a presentation at the WITDC Mental Health and Wellness day. The recordings are out and here’s the ... Continue reading
2021-06-11 (first published: 2021-05-27)
212 reads
Writing to the screen is a really basic debugging technique. That said, since I’m really new with Powershell this is ... Continue reading
2021-06-04 (first published: 2021-05-20)
616 reads
This is a pretty handy little tool in your arsenal. I’ve talked about using bcp to transfer data from one ... Continue reading
2021-06-03
218 reads
Several times over the last few weeks I’ve gotten a request to create a new work database. The individuals from ... Continue reading
2021-05-28 (first published: 2021-05-18)
770 reads
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...
By James Serra
A bunch of new features for Microsoft Fabric were announced at the Microsoft Fabric Community...
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