For several years I have happily relied on @@IDENTITY to return the latest identity of a row when inserting data. However, I have started using the OUTPUT clause and have discovered the entertainment to be had in getting the latest identity when writing to two or more tables with what can appear to be one command. Continue reading
Archive | @@IDENTITY RSS feed for this section
The Joys of @@IDENTITY, Scope_Identity and IDENT_CURRENT
31 Mar
- Comments Leave a Comment
- Categories @@IDENTITY, Introduction, SQL, Training
Recent Posts
Archives
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- April 2019
- March 2019
- November 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- January 2017
- December 2016
- September 2016
- July 2016
- December 2015
- November 2015
- September 2015
- August 2015
- July 2015
- May 2015
- April 2015
- March 2015
- February 2015
- November 2014
- October 2014
- August 2014
- February 2014
- December 2013
- November 2013
- October 2013
- September 2013
Categories
- @@IDENTITY
- Availability Groups
- Backups
- Certificates
- Column set
- Compress
- Constraints
- CSV
- Data Masking
- Data Structure
- DBCC
- Distributor
- Editing
- Error Log
- Errors
- Extended Events
- Heaps
- impersonation
- Indexing
- Installation
- Instant File Initialization
- Introduction
- Isolation Levels
- JSON
- LDAP
- MERGE
- Monitoring
- NOCHECK
- NOLOCK
- Optimiser
- OUTPUT
- Package Errors
- Parameters
- Partitioned Views
- Partitioning
- Pivot
- PowerShell
- Publisher
- Replication
- Replication
- Restore
- Row_Number
- Security
- SESSION_CONTEXT
- SHRINKFILE
- Slowly Changing Dimensions
- Snapshot Backup
- Sparse Columns
- SQL
- SSIS
- SSISDB
- SSMS
- STUFF
- TABLESAMPLE
- Training
- Transactions
- Uncategorized
- UnPivot
- Versioning
- Views
- XML
- ZappySys
Recent Comments