I want to retrieve the last 100 inserted records in sql server 2008.
Please correct my code.
Pkey in the table testContext.testDetailRecords is an identity column.
var pkeys = (from tests in testContext.testDetailRecords
where tests.Pkey > (select max(tests.Pkey)-100 from testContext.testDetailRecords))
select tests.Pkey).ToList();
How about
This should roughly translate to SQL