The sysname datatype defaults to not NULL.
The other day I was creating a table to store some metadata. Since the metadata I was collecting (sys.databases.name for ... Continue reading
2021-09-10 (first published: 2021-08-26)
188 reads
The other day I was creating a table to store some metadata. Since the metadata I was collecting (sys.databases.name for ... Continue reading
2021-09-10 (first published: 2021-08-26)
188 reads
One of the things I hate most about using remote desktop is when the resolution for the remote server is ... Continue reading
2021-09-09
45 reads
I’m going to be fairly high level on these because to be honest, if you are going to use them ... Continue reading
2021-09-07
69 reads
Many years ago I was given a work request that literally just said: It’s broke. Fix it. I’m sure you ... Continue reading
2021-09-03 (first published: 2021-08-12)
425 reads
tldr: No. You have to use sp_refreshview. One of the only good things to come out of all of the ... Continue reading
2021-09-01 (first published: 2021-08-17)
302 reads
Wow, it’s TSQL Tuesday again! Tjay Belt (blog|twitter) is our host this month and he’d like us to talk about ... Continue reading
2021-08-27 (first published: 2021-08-10)
229 reads
This was a rather interesting error. I’d certainly never seen it before, and based on one of the answers to ... Continue reading
2021-08-24
149 reads
Seriously. Make a point of reading your resume before submitting it, and again before an interview. I’ve been helping with ... Continue reading
2021-08-20 (first published: 2021-08-05)
247 reads
I’m giving a presentation at the PASS Data Community Summit 2021 being put on by Redgate! It’s going to be ... Continue reading
2021-08-19
28 reads
A few years back (wow time flies) I had you Work with Security. It’s been a while so if you ... Continue reading
2021-08-18 (first published: 2021-08-03)
308 reads
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...
By James Serra
A bunch of new features for Microsoft Fabric were announced at the Microsoft Fabric Community...
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