Error in SSMS: Attempted to read or write protected memory.
There are a lot of reasons to write a blog post. One of my favorites is when I’ve been asked...
2019-02-18
160 reads
There are a lot of reasons to write a blog post. One of my favorites is when I’ve been asked...
2019-02-18
160 reads
This month Andy Leonard (b/t) wants to know why we do what we do. Funnily enough, this is something I...
2019-02-12
679 reads
Of the different basic types of backups (full, differential and log) I find the differential the most interesting, and frequently...
2019-02-12 (first published: 2019-01-23)
2,152 reads
The other day I talked about using Microsoft Learn. Well, honestly, Cloud Academy is the learning tool I’ve been using...
2019-02-06
210 reads
Sometimes you need a table that is read only. You don’t want anyone to be able to write to it...
2019-02-05 (first published: 2019-01-21)
2,645 reads
This homework series really has two purposes. It’s a primer for beginners. These are tasks I think most if not...
2019-02-04
193 reads
2019-01-30
235 reads
The other day I took a Microsoft Learn course about securing Azure SQL DB. It was really enjoyable and I...
2019-01-29 (first published: 2019-01-16)
2,149 reads
SQL Bits is almost here! It’s February 27th to March 2nd. SQL Bits is one of the most popular SQL...
2019-01-14
724 reads
Last July (yes, it’s taken me 5+ months to finally finish this) Steve Jones (b/t) suggested that it might be...
2019-01-10
167 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