2009-09-18
3,671 reads
2009-09-18
3,671 reads
2009-09-16
4,454 reads
2009-09-15
4,249 reads
Often someone will try to perform a delete on a large number of records and run into a number of problems. Slow performance, log growth, and more. Lynn Pettis shows us how to better handle this situation in SQL Server 2000 and SQL Server 2005
2011-02-18 (first published: 2009-09-15)
54,480 reads
Do you want to improve your T-SQL skills? MVP Jacob Sebastian runs regular challenges to get you to think about how to solve a problem in T-SQL. These run monthly and we have a summary and explanation from challenge #1 to help you learn more about moving data from 3 tables into a specific format.
2009-09-14
9,847 reads
It is not always easy to spot "antipatterns" in your SQL, especially in more complex queries. In this article, Plamen demonstrates some of the most common SQL coding errors that he encounters, explains their root cause, and illustrates potential solutions.
2009-09-11
8,634 reads
Previous T-SQL best practices articles have discussed different coding styles that led to slow and fast query executions, and ways to minimize cached plans. This article will be an extension on those concepts, focusing on how the SQL Server optimizer tries to parameterize a query if it can, as well as how you can build your own parameterized query.
2009-09-03
5,866 reads
Joe becomes intrigued by the way that experts make errors in any area of technology, and suggests that the problem is more that of mindsets than lack of knowledge. He illustrates the point with SQL Development by means of the "Britney Spears, Automobiles and Squids" table, and the tangled Stored procedure, and shows ways of getting rid of both procedural and non-procedural code by adopting a different programming mindset.
2009-09-03
5,983 reads
Use sysindexes\DMVs insead of select count(*) to retreive table row counts
2011-01-28 (first published: 2009-09-02)
57,711 reads
2009-08-31
4,847 reads
By Steve Jones
Thanks to everyone who attended my sessions today at SQL Saturday Boston 2025. I’ve...
SQL Server 2025 introduces native support for vector data types and external AI models....
By Steve Jones
Fear is fueled by a lack of imagination. The antidote to fear is not...
I'm building ETL packages in SSIS. My data comes from an OLE DB Source...
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...
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