TSQL Tuesday #127 Invite – Non SQL Tips and tricks
How about for this months TSQL Tuesday let’s do another month of tips and tricks. But just to be a ... Continue reading
2020-06-02
21 reads
How about for this months TSQL Tuesday let’s do another month of tips and tricks. But just to be a ... Continue reading
2020-06-02
21 reads
The other day I had a brief conversation with Itzik Ben-Gan (about|twitter) on twitter and I have to tell you ... Continue reading
2020-05-26
108 reads
A good friend of mine (Randolph West (blog|twitter) asked that someone Explain CROSS APPLY like they are 5. So, here’s ... Continue reading
2020-05-25 (first published: 2020-05-11)
1,819 reads
The other day I got this rather interesting error while connecting to an Azure SQL DB. I was connecting using ... Continue reading
2020-05-20
98 reads
An interesting question came to my attention the other day. A strange operation problem in SQL Server: -100/-100*10 = 0 ... Continue reading
2020-05-18
409 reads
The other day I had a random thought. I wonder if there is a version of Azure Portal for Android. ... Continue reading
2020-05-13
70 reads
When connecting to a SQL Server instance sometimes you’ll see (local), localhost or even just a single period (hard to ... Continue reading
2020-05-12 (first published: 2020-04-27)
372 reads
This is an interesting error that you’ll occasionally get when accessing an AD/Windows ID. Msg 15404, Level 16, State 11, ... Continue reading
2020-05-06
153 reads
I ran into an interesting problem today. I needed to find out the pricing tier of an Azure SQL DB ... Continue reading
2020-05-06 (first published: 2020-04-22)
452 reads
A few months ago I suggested writing blog post(s) as a great way to learn and document your progress (among ... Continue reading
2020-05-04
22 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