Hi,
I'm building a website using ASP.NET and SQL Server, and I use
SELECT PK FROM Table WHERE PK = @@identity
My question is which is better and more reliable to retrieve the last inserted PK for multiuser website, using @@identity
or using this:
SELECT MAX(PK) FROM Table WHERE PK = Session ("UserID")