SELECT @@IDENTITY

All Things: SELECT @@IDENTITY. works in MySQL 4 and Microsoft SQL Server’, get you the last auto increment value (used to gett the primary key for a table after an insert )

Leave a Reply