March Madness – SQL Server style
Bodypaint not required
It seems that March is another great month for getting your geek on without having to leave the...
2012-03-08
628 reads
Bodypaint not required
It seems that March is another great month for getting your geek on without having to leave the...
2012-03-08
628 reads
It’s been a couple of weeks since my last post, but I swear I have a good excuse. I’ve been...
2012-03-05
1,238 reads
Another key component of any good maintenance plan is updating statistics. Statistics are what help the SQL Server optimizer choose...
2012-02-27 (first published: 2012-02-21)
2,539 reads
In response to my last post, I got a very interesting comment from Philip:
“I would love to see a way...
2012-02-13 (first published: 2012-02-09)
1,547 reads
As good little DBAs, we should be gathering baseline statistics for our database servers. These stats can give us insight...
2012-02-13
2,790 reads
4 out of 5 DBAs agree
I’ve covered creating my backup directories and the actual backup of the database(s). The last...
2012-02-08 (first published: 2012-02-06)
2,298 reads
Last time I dealt with the creation of subdirectories, in one or more root locations, to house my database backups....
2012-01-30
1,832 reads
Remember kids...
Anyone who knows me knows that I’m a big proponent of automating routine tasks. If I have to do...
2012-01-26 (first published: 2012-01-23)
3,541 reads
Last week’s resolutions post reminded me that it’s time for another status check on the goals I set for myself...
2012-01-17
813 reads
Welcome to the first TSQL Tuesday of 2012! This month’s soiree is being hosted by Dave Howard (blog | twitter) and...
2012-01-10
907 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