SQLBits XI recently announced
When I saw an email from SQLBits announcing SQLBits XI in East Midlands in my inbox this morning, it simply...
2012-11-14
825 reads
When I saw an email from SQLBits announcing SQLBits XI in East Midlands in my inbox this morning, it simply...
2012-11-14
825 reads
Over the weekend I received an email supposedly from Microsoft Live wanting me to verify my account and provided a...
2012-10-26 (first published: 2012-10-24)
1,656 reads
I’ve been aware of this clause in TSQL for a long time, but I’ve never really used it. Mainly because...
2012-09-26
1,075 reads
I was helping out on the forums the other day with a user who had stumbled across the quirk of...
2012-08-28
6,682 reads
SQL jobs are great as the SQL agent job engine allows for very granular control over jobs that are created...
2012-08-23
2,575 reads
Not another comma separated string blog post I hear you say! I know that this topic has probably been done...
2012-07-13
6,721 reads
I haven’t been able to do much XQuery development recently which is a shame as I love developing with the...
2012-07-09
4,523 reads
Ok, so this is not strictly a post about SQL itself (and it's about a fairly old OS), but I...
2012-06-25
2,711 reads
I was helping out a user on the forums the other day where they were asking questions about shredding an...
2012-05-22 (first published: 2012-05-16)
5,366 reads
I regularly deploy SQL Server to new Windows Server 2008 hosts and one thing that I find quite a chore...
2012-05-10
3,736 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