In SQL Server 2008 and higher what is the best/safest/most correct way
- to retrieve the ID (based on autoincrementing primary key) out of the database table?
- to retrieve the value of the last row of some other column (like, SELECT TOP 1 FROM Table ORDER BY DESC)?