What’s in a Name?: Inside the Wacky World of T-SQL Identifiers
(last updated: 2018-04-28)
Today we are going to take a look into an area that you probably are thinking has very...
2018-04-18 (first published: 2018-04-09)
2,901 reads
(last updated: 2018-04-28)
Today we are going to take a look into an area that you probably are thinking has very...
2018-04-18 (first published: 2018-04-09)
2,901 reads
(last updated: 2018-04-18)
This is Part 3 of 2. Yes, you read that correctly. You see, way back at the very...
2018-04-16
254 reads
(last updated: 2018-04-28)
Recap
In Part 1 of this 2 part series, I started with the loose definition in Microsoft’s documentation for...
2018-04-11 (first published: 2018-04-06)
2,076 reads
(last updated: 2019-01-05 @ 23:15 EST / 2019-01-06 @ 04:15 UTC )
Let’s say that you execute the following T-SQL:
SET CONTEXT_INFO 1234;
SELECT CONVERT(INT, CONTEXT_INFO());
The...
2018-04-09
1,124 reads
(last updated: 2018-04-09)
In answering a recent question on DBA.StackExchange related to why some characters work for parameter names and others...
2018-04-03
561 reads
Part of having good security is giving users the fewest / least permissions possible in order to execute the code. However,...
2018-03-15 (first published: 2018-03-05)
2,383 reads
Part of having good security is giving users the fewest / least permissions possible in order to execute the code. However,...
2018-02-28 (first published: 2018-02-15)
2,633 reads
If the new “CLR strict security” Server-level configuration option in SQL Server 2017 hasn’t caused enough confusion and pain, then,...
2018-02-23
1,383 reads
(last updated: 2018-06-05)
This post is, for the most part, a continuation of Server Audit Mystery 1: Filtering class_type gets Error...
2018-02-12 (first published: 2018-01-30)
3,155 reads
Version 4.1 of SQL# has just been released!
New functionality available only in Full version
Sys_LockResourceReturns the name of the specified Lock...
2018-02-12
1,328 reads
By Steve Jones
Thanks to everyone who attended my sessions today at SQL Saturday Boston 2025. I’ve...
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...
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