New blogger: Jamie Wick
New SQL blogger
Jamie at the 45th Parallel (South) – New Zealand
This post is just a quick shout-out. My friend and co-leader...
2018-06-15
334 reads
New SQL blogger
Jamie at the 45th Parallel (South) – New Zealand
This post is just a quick shout-out. My friend and co-leader...
2018-06-15
334 reads
Killing Time – or removing the time element from a datetime
Over the course of time, we all collect scripts and routines...
2018-06-07
2,033 reads
One of the things that you will no doubt end up experiencing as a DBA is that you will see...
2018-05-16
1,504 reads
SSMS (and other SQL Server utilities) utilize a batch separator to, well, separate batches of T-SQL statements. Before we go...
2018-04-18
1,995 reads
Database Code Smells
I was recently reviewing a newly created T-SQL stored procedure. This procedure was verifying temporary table existence with...
2018-04-11
2,024 reads
This post talks about having primary replica jobs. That is, jobs that will only run on the primary replica of...
2018-04-02
938 reads
There are several different options available for working with tabs and spaces in SSMS. In fact, there are enough that...
2018-03-29 (first published: 2018-03-21)
2,942 reads
Do you ever find yourself working on a query and realize that you need just a bit more real estate...
2018-02-28
514 reads
As you already know, SQL Server runs as a service. And services require a service account to run under. While...
2018-03-02 (first published: 2018-02-19)
16,884 reads
Back to the SQL Server Basics with Wayne
Connecting to a SQL Server instance is one of the first things that...
2018-02-19 (first published: 2018-02-07)
2,874 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