Two simple commands that can be a big help in performance tuning.
The first thing that always comes to mind when discussing performance tuning is query plans and rightly so. They are...
2014-09-02
2,593 reads
The first thing that always comes to mind when discussing performance tuning is query plans and rightly so. They are...
2014-09-02
2,593 reads
In order to speed up our backups on a large database our team decided to stripe the backup files. In...
2014-08-25 (first published: 2014-08-18)
7,520 reads
This is a quick demo of a little “trick” with heaps I’ve known about for a couple of years. However...
2014-08-25
612 reads
Two years ago today I began my blog with a post about the DEFAULT keyword. I set out with the...
2014-08-20
944 reads
If you have worked with SQL Server for very long you have probably run across the extremely useful system function...
2014-08-14
1,494 reads
Quick quiz. Which of these two commands is the opposite of GRANT?
DENYREVOKE
Well lets start with some definitions
GRANT – Grants permissions on...
2014-08-12 (first published: 2014-08-04)
8,515 reads
This month’s T-SQL Tuesday topic is SQL Family and is brought to us by Jeffrey Verheul (b/t). It’s an amazing...
2014-08-12
586 reads
Did you know that whatever columns you pick as your clustered index will be included in any non clustered indexes...
2014-08-07 (first published: 2014-07-30)
9,425 reads
What
When you use the SchemaBinding keyword while creating a view or function you bind the structure of any underlying tables...
2014-08-06
1,117 reads
Recently I wrote about what it means that a value is NULL. Right at the beginning I mentioned ANSI_NULLS and...
2014-08-04 (first published: 2014-07-28)
22,359 reads
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,...
No Scooby-Doo story is complete without footprints leading to a hidden passage. In SQL...
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