T-SQL Tuesday #86: Enhancement Requests
On the second Tuesday of each month, the SQL Server universe all comes together to blog about a topic. Known...
2017-01-10
393 reads
On the second Tuesday of each month, the SQL Server universe all comes together to blog about a topic. Known...
2017-01-10
393 reads
How SQL Server uses Windows Virtual Accounts and local groups
Managed Service Accounts (MSAs) and Virtual Accounts were introduced in Windows...
2016-12-28
2,324 reads
Way back in 2006, Paul Randal documented DBCC PAGE on his Microsoft blog at http://blogs.msdn.com/b/sqlserverstorageengine/archive/2006/06/10/625659.aspx. In his post, you will...
2016-12-21
400 reads
It’s that time of the month… the time when all of the T-SQL bloggers have a party and blog about...
2016-12-13
390 reads
Most of the DBCC commands return their results as textual output, even if you have SSMS configured to return result...
2016-11-16
445 reads
You know, these 1 hour sessions that are at most SQL Saturdays are just too short sometimes – you just get...
2015-07-20
752 reads
A while back, I wrote a blog post showing the differences (including performance) between Inline Table-Valued Functions (ITVF) and Multi-Statement...
2015-07-16
1,046 reads
You know, these 1 hour sessions that are at most SQL Saturdays are just too short sometimes – you just get...
2015-05-11
566 reads
Earlier this month, I hosted the 61st occurrence of the monthly TSQL-Tuesday blogging party. With a topic of “Giving Back”,...
2014-12-31
1,369 reads
A little over 5 years ago, Adam Machanic (B|T) had this great idea of getting everyone in the SQL Community...
2014-12-09
702 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,...
I've noticed several instances of what looks like a recursive insert with the format:...
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...
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