T-SQL Tuesday #36 – Community
Chris Yates (@YatesSQL / blog) is hosting the T-SQL Tuesday blogging party this month, and he wants to know “What does...
2012-11-13
725 reads
Chris Yates (@YatesSQL / blog) is hosting the T-SQL Tuesday blogging party this month, and he wants to know “What does...
2012-11-13
725 reads
The Myth
One misconception that I see a lot deals with how data is stored in a clustered index. Specifically – is...
2012-10-21
8,073 reads
The Scenario:
You just restored a production database on a development server. You’ve told the developers that it’s restored, and you...
2012-10-03
2,702 reads
Hello? Mr. DBA? Have you got a moment?
So there you are, enjoying one of the few quiet moments of your...
2012-08-15
5,218 reads
Late last year, my life got strange. Well, it’s always been strange, so let’s just say it became stranger than...
2012-07-18
743 reads
The PASS Summit 2012 schedule has been released, and I’m proud to announce that I’ve been selected to present a...
2012-06-25
679 reads
Lately, I’ve been asked by several folks about the interview questions that I use when I interview candidates for SQL...
2012-06-15 (first published: 2012-06-11)
11,944 reads
ORM tools. They’re great. They’re evil.
In the right hands, used the proper way, they can be a very powerful, very...
2012-06-11
3,470 reads
Next up on the SQL Server 2012 Performance testing circuit: Gap Detection. You know, where you find missing values from...
2012-04-19
3,282 reads
This month, T-SQL Tuesday is being hosted by Nigel Sammy. Since the RTM of SQL Server 2012 just occurred, he...
2012-04-10
1,603 reads
By Chris Yates
The New Arena of Leadership The role of the Chief Data Officer is no...
Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...
SELECT * feels convenient, but in SQL Server it bloats I/O, burns network bandwidth,...
Comments posted to this topic are about the item Cleaning Up the Cloud
Comments posted to this topic are about the item The Maximum Value in the...
Comments posted to this topic are about the item Oracle Performance Tuning: Practical Techniques...
I have a table with this data:
TravelLogID CityID StartDate EndDate 1 1 2025-01-01 2025-01-06 2 2 2025-01-01 2025-01-06 3 3 2025-01-01 2025-01-06 4 4 2025-01-01 2025-01-06 5 5 2025-01-01 2025-01-06I run this code:
SELECT IDENT_CURRENT('TravelLog')I get the value 5 back. Now I do this:
SET IDENTITY_INSERT dbo.TravelLog ON INSERT dbo.TravelLog ( TravelLogID, CityID, StartDate, EndDate ) VALUES (25, 5, '2025-09-12', '2025-09-17') SET IDENTITY_INSERT dbo.TravelLog OFFI now run this code.
DBCC CHECKIDENT(TravelLog) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-10-14', '2025-10-17') GOWhat is the value for TravelLogID for the row I inserted for CityID 4 and dates starting on 14 Oct 2025? See possible answers