THE SQL Server Blog Spot on the Web
Welcome to SQLblog.com - The SQL Server blog spot on the web
Browse by Tags
Database Unit Testing
Stress testing UPSERTs
Suppose that you need to implement the following logic: IF(row exists) Update the row ELSE Insert a new row. If you already are on 2008, you should use MERGE command, and you don’t need to read this post. Prior to 2008 this logic has to be implemented using UPDATE and INSERT commands. I will stress test several ...
December 14, 2008
Fun with DBCC CHECKIDENT
<Denis Gobo’s mode on> Suppose you have an empty table: SELECT COUNT(*) FROM SampleTable --- 0 What would be the result of the following query: DBCC CHECKIDENT('SampleTable', RESEED, 1) INSERT SampleTable(j) SELECT 1 SELECT SCOPE_IDENTITY() <Denis Gobo’s mode ...
June 26, 2008
Brought to you by