What does that N in nvarchar really mean?
In any study of Data Types in SQL Server you are going to have to look at the various string...
2015-12-28
2,382 reads
In any study of Data Types in SQL Server you are going to have to look at the various string...
2015-12-28
2,382 reads
I couldn’t think of anything really fun to post for Christmas Eve-Eve and I’ve been busy buying and wrapping presents...
2015-12-23
501 reads
Every now and again it can be very helpful to know what the current database context is when you are...
2015-12-21
670 reads
There are several types of triggers.
Logon triggers – Fired when someone tries to connect to the instance.DML triggers – Fired after...
2015-12-17 (first published: 2015-12-14)
1,691 reads
A few weeks ago I was reading a blog post by Andrea Allred (b/t) and was just amazed by what...
2015-12-16
578 reads
Every now and again I hear or read that the only file extensions for a SQL Server database are mdf,...
2015-12-10 (first published: 2015-12-02)
2,310 reads
I ran into an interesting problem the other day. Given the title of the post, obviously a unique constraint was...
2015-12-10
1,620 reads
It’s the Christmas season! And it’s T-SQL Tuesday! And Bradley Ball (b/t), SQL’s very own superhero (one of many really...
2015-12-08
524 reads
You have an on call, you have a business continuity plan, you have a disaster recovery plan but what happens...
2015-12-07 (first published: 2015-11-30)
2,449 reads
The transaction log is made up of one or more files that are used sequentially. So in other words if...
2015-11-27 (first published: 2015-11-23)
1,539 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,...
Why is sql doing a full scan VS seeking on the index? I've included...
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...
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