Sometimes a change is as good as a break : T-SQL Tuesday #134
James McGillivray (blog|twitter) wants us to give him a break. Well. Actually I guess he wants to know how we ... Continue reading
2021-01-12
133 reads
James McGillivray (blog|twitter) wants us to give him a break. Well. Actually I guess he wants to know how we ... Continue reading
2021-01-12
133 reads
It’s a brand new year and hopefully it will be better than last year. While that may be particularly true ... Continue reading
2021-01-11 (first published: 2021-01-05)
355 reads
It’s a brand new year and hopefully it will be better than last year. While that may be particularly true ... Continue reading
2021-01-05
1 reads
2020 was a rough year. We’ve had friends and family leave us. Jobs lost. Health scares a plenty and that’s ... Continue reading
2020-12-31
60 reads
Christmas. Depending on where you live it’s a big deal even if you aren’t Christian. It pervades almost every aspect ... Continue reading
2020-12-03
80 reads
It’s been a while since I worked with compression and the other day I needed to check which of my ... Continue reading
2020-11-27 (first published: 2020-11-17)
493 reads
Note: This is not exactly a dyanmic linked server. It just gets dropped and recreated in a loop. I recently ... Continue reading
2020-11-23 (first published: 2020-11-12)
329 reads
Creating a user is simple right? Yes and no. First of all, at least in SSMS it appears you don’t ... Continue reading
2020-11-19 (first published: 2020-11-05)
346 reads
Taiob Ali (blog|twitter) is our host for TSQL Tuesday this month and he’d like us to talk about how our ... Continue reading
2020-11-13 (first published: 2020-11-10)
262 reads
If you ask any senior IT person What is the most important tool you have? there is a decent chance that ... Continue reading
2020-11-10 (first published: 2020-11-03)
576 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