What version of SQL is SSMS scripting for?
Recently (honestly it’s been a few years now) Microsoft split the lifecycle for SSMS out from the general SQL Server ... Continue reading
2019-03-25
14 reads
Recently (honestly it’s been a few years now) Microsoft split the lifecycle for SSMS out from the general SQL Server ... Continue reading
2019-03-25
14 reads
I tend to feel that a lot of people who use triggers don’t really understand them. That said, every now...
2019-03-20 (first published: 2019-03-06)
2,324 reads
I’m a big fan of T-SQL Tuesday. Each month there is a host who comes up with a topic, and...
2019-03-18
445 reads
You’ve heard of tempdb right? It’s one of the system databases. All of the system databases are important but poor...
2019-03-15 (first published: 2019-03-04)
2,410 reads
This month our intrepid host for T-SQL Tuesday is Shane O’Neill (b/t). He’s asked us to talk about our cookies....
2019-03-12
247 reads
The thing about DBA Myths is that they are generally widespread and widely believed. At least I believed this one...
2019-03-04 (first published: 2019-02-14)
2,436 reads
Dem queries, dem queries, dem slow queries,
Dem queries, dem queries, dem fast queries,
Dem queries, dem queries, dem big queries,
Now write...
2019-02-27
1,146 reads
So I was trying to work on a blog post about the new truncation error this morning and realized I...
2019-02-25
233 reads
Ever looked at the list of databases and wonder why you own one of them? Or why some other user...
2019-02-20
131 reads
Indexes are probably the number one tool we have to improve performance. That said, there are times when we want...
2019-02-18 (first published: 2019-01-28)
2,453 reads
By Steve Jones
Fear is fueled by a lack of imagination. The antidote to fear is not...
The slidedeck and the SQL scripts for the session Indexing for Dummies can be...
By Chris Yates
Change is not a disruption in technology; it is the rhythm. New frameworks appear,...
We have a report that has multiple tables that list the top 15 performers...
We have a tool called DB Moto that reads journals (like t-logs) and replicates...
Comments posted to this topic are about the item Don't Forget About Financial Skills
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