Filtering Object Explorer
I absolutely love learning new tricks that can be done in SSMS. Everything from opening initial connections to both the...
2013-10-02
890 reads
I absolutely love learning new tricks that can be done in SSMS. Everything from opening initial connections to both the...
2013-10-02
890 reads
In my general quest to figure out the T-SQL to do common GUI tasks I did some browsing through BOL...
2013-10-01 (first published: 2013-09-26)
1,655 reads
What the heck? Even indexes have WHERE clauses these days. I can’t remember what I was reading when I saw...
2013-09-30
1,349 reads
Recently I wrote about the myth that you can’t use an alias in an UPDATE statement. You can of course,...
2013-09-24
873 reads
Last month I posted my stored procedures sp_SrvPermissions and sp_DBPermissions. I’m posting V2.0 of each with a few fixes. The...
2013-09-23 (first published: 2013-09-18)
2,448 reads
Last month I posted my stored procedures sp_SrvPermissions and sp_DBPermissions. I’m posting V2.0 of each with a few fixes. The...
2013-09-23 (first published: 2013-09-18)
2,076 reads
This is possibly the best blog I have every read on the subject of reviewing a database. It is witty,...
2013-09-17
701 reads
I’ve found a very common belief among users of T-SQL (both DBAs and Developers) is that you can’t use an...
2013-09-16
880 reads
Since Microsoft decided to drop the MCM/MCA program there has been an enormous amount of discussion about the program and...
2013-09-11
530 reads
I recently asked what the difference is between granting SELECT to a user (at a database level) and adding the...
2013-09-09
1,019 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