It is a common business case to have to reuse the auto-generated SQL Server’s IDENTITY value. One way to deal with the problem is to use the system function @@IDENTITY. For example:
Posts Tagged ‘sql’
May 6, 2011 by Francois · Leave a Comment
Filed under: TSQL
Social Tagging: @@IDENTITY • bug • INSERT • OUTPUT • SCOPE_IDENTITY() • sql • sql server • TSQL
Filed under: TSQL
Social Tagging: @@IDENTITY • bug • INSERT • OUTPUT • SCOPE_IDENTITY() • sql • sql server • TSQL
April 29, 2011 by Francois · 2 Comments
Filed under: Performance
Social Tagging: Clustered • Heap • Index • sql • sql server
Filed under: Performance
Social Tagging: Clustered • Heap • Index • sql • sql server
Heap tables (tables without a clustered index) are generally not part of a good database design. Unless you never actually query your table, you should always put a clustered index on it. Heap table are generally slower on selects, updates and deletes. They are also generally slower on inserts if you decide to use a […]
RSS