Return to Snippet

Revision: 17318
at August 31, 2009 22:48 by rengber


Initial Code
BEGIN
  	  INSERT INTO [dbo].[Transaction]
	  (
		[TotalAmountPaid]
		,[TransactionDttm]
	  )
	  VALUES
	  (
		@TotalAmountPaid
		,@TransactionDttm
	  )
	
	  Select SCOPE_IDENTITY() as 'TransactionID'
	END

Initial URL

                                

Initial Description
Dead simple, but often forgotten.

Initial Title
TSQL to Get the SQL Autonumber ID of the Row Just Inserted

Initial Tags
database, sql, query

Initial Language
SQL