Using a Staging Environment for Tracking Down Bugs
A discussion why having a staging environment with data that mirrors production is vital to tracking down issues.
Being able to...
2011-06-08
2,131 reads
A discussion why having a staging environment with data that mirrors production is vital to tracking down issues.
Being able to...
2011-06-08
2,131 reads
A discussion about nightly populated tables and how they have reduced SQL Server load.
What’s more important – speed or data accuracy/quality...
2011-06-05
1,284 reads
Why OR conditions in join statements should be avoided and an example fix.
OR conditions and join statements – some things just...
2011-06-03
2,781 reads
A discussion of how BPS uses a SQL exercise for candidates and why it is helpful.
At the Boston Public Schools,...
2011-06-01
2,706 reads
A followup to a post about subqueries with an estimation for how long it would take for the query to...
2011-05-30
3,354 reads
A discussion of how views give a more denormalized means for querying against normalized tables.
Ad-hoc reports are frequently requested at...
2011-05-28
841 reads
A discussion of how NEWID can be used to help randomize the results returned from a SQL query.
A scenario I...
2011-05-26
1,140 reads
A discussion of how joins significantly outperform subqueries and how this is more evident when OR conditions are involved.
SQL queries...
2011-05-25
943 reads
Thank you to everyone reading this site - Please enjoy your stay!
HelpWithSQL has hit double digits in posts! I hope everyone...
2011-05-24
612 reads
A discussion about SQL joins and subqueries with information about how to format join statements properly.
In any non-trivial task, developers...
2011-05-22
1,099 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,...
Comments posted to this topic are about the item Building AI Governance and Policies-...
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...
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