T-SQL HOST_ID and HOST_NAME
HOST_ID and HOST_NAME
Included in T-SQL for SQL Server is a functions that returns the workstation information that executes a SQL...
2015-04-20
3,501 reads
HOST_ID and HOST_NAME
Included in T-SQL for SQL Server is a functions that returns the workstation information that executes a SQL...
2015-04-20
3,501 reads
SQL Server 2014 Deprecated Features – Database Engine
Everyone looks at the new features when trying to determine when to upgrade from...
2015-03-19
2,024 reads
Call for speakers is now open for SQL Saturday #408 in Houston, TX. If you are interested in presenting please...
2015-03-13
893 reads
What is the Azure Data Factory?
The Azure Data Factory is a managed service for data storage and processing. It allows...
2015-03-10
1,391 reads
T-SQL EXCEPT and INTERSECT
Both T-SQL EXCEPT and INTERSECT are set based operators that combine multiple query results back in the same...
2015-03-03 (first published: 2015-02-23)
9,007 reads
T-SQL UNION
Set operators allow you to combine data from two or more queries and return the results in a single...
2015-02-13 (first published: 2015-02-04)
8,662 reads
SSRS Farm Overview
Building a SSRS farm will require Enterprise or Business Intelligence editions of SQL Server for versions 2012 and...
2015-01-26
1,356 reads
T-SQL Random Numbers using RAND()
SQL Server includes the T-SQL RAND() function to create a random value between 0 and 1...
2015-01-12
1,384 reads
T-SQL COALESCE
SQL Server T-SQL coalesce simplifies the use of a case statement to find the first non-null value of your...
2014-12-30 (first published: 2014-12-26)
8,998 reads
Row_Number SQL Server
SQL Server includes several Ranking Functions that can be called in T-SQL. One of these is the Row_Number()...
2014-12-22 (first published: 2014-12-16)
8,845 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