The parts of an object’s name
Any object within a database in SQL Server has what is called a four part name. Which rather implies four...
2017-03-20
359 reads
Any object within a database in SQL Server has what is called a four part name. Which rather implies four...
2017-03-20
359 reads
My company has recently adopted a Cloud first attitude. Now that’s different from Microsoft’s Cloud first. Microsoft is putting new...
2017-03-08
512 reads
These are those queries where you are pulling for, let’s say, a first name, a last name, a state, and/or...
2017-03-06 (first published: 2017-02-27)
3,524 reads
Recently, Aaron Bertrand (b/t) posted Performance Surprises and Assumptions : GROUP BY vs. DISTINCT. In it he says he prefers GROUP...
2017-03-06
2,435 reads
One of the most common ways to get an event notification is by email. So what happens when you get...
2017-03-01
378 reads
Restoring a backup file is pretty easy right?
RESTORE DATABASE [Test] FROM DISK = 'C:\backups\backup.bak';Ok, but what if more than one database...
2017-02-22
937 reads
Growing up my mother used this phrase quite a bit. Penny wise, pound stupid. (In case you didn’t know the...
2017-02-20
414 reads
Everyone deals with deadlocks from time to time. But sometimes we need to control who’s the deadlock victim and who...
2017-02-17 (first published: 2017-02-08)
2,895 reads
I had an interesting problem recently. A database was stuck in single user mode. How exactly was it stuck you...
2017-02-16
1,413 reads
Sometimes you have a requirement to grant permissions to every database on an instance. Historically this has required creating a...
2017-02-14
717 reads
SQL Server 2025 introduces native support for vector data types and external AI models....
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...
I'm building ETL packages in SSIS. My data comes from an OLE DB Source...
Comments posted to this topic are about the item Building AI Governance and Policies-...
Why is sql doing a full scan VS seeking on the index? I've included...
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