Msg 7395: Unable to start a nested transaction
Happy new year, SQL peeps! I hope everyone had a wonderful holiday. Last week was very quiet at work, but...
2012-01-05
3,232 reads
Happy new year, SQL peeps! I hope everyone had a wonderful holiday. Last week was very quiet at work, but...
2012-01-05
3,232 reads
SELECT 'Happy '+ DATENAME(dw, GETDATE())Welcome to the penultimate installment of SQL Server A to Z (it’s not often I get to...
2012-01-02 (first published: 2011-12-26)
2,282 reads
How fitting that I should close out the A to Z series while I close out the year. We’ve finally...
2011-12-29
2,067 reads
Merry Christmas everyone!
DECLARE @hohoho char(100)
DECLARE @bells smallint
DECLARE @tiers smallint
DECLARE @maxtiers smallint
SELECT @hohoho = ' ', @tiers = 1, @bells = 1, @maxtiers = 6
PRINT @hohoho
WHILE @tiers...
2011-12-22
795 reads
If you fill the jar with pebbles first, you'll never have room for the big rocks.
I’m sure you’ve heard the...
2011-12-19
1,208 reads
Jason Strate (blog|@StrateSQL) is starting a new blog meme: #meme15. The overall topic of #meme15 will be social networking, obviously...
2011-12-15
608 reads
I can’t believe it’s already December. This year has just flown by. The rush of holiday events has already started,...
2011-12-08
1,729 reads
This month’s T-SQL Tuesday is being hosted by Allen White (blog | @SQLRunr ). The topic: Share your T-SQL tips and tricks. ...
2011-12-06
1,237 reads
We’re all busy people. We have jobs, families, and responsibilities out the wazoo. Little Timmy needs to be picked up...
2011-12-05
721 reads
So I finally managed to get my hands on a VM with Windows 2008 R2 SP1 so I could install...
2011-12-01
1,130 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