declare @count int SELECT @count = count(*) from tableNameselect * from tableName except select top (@count - 2) * from tableName
Mark This Response as Answer -- Chandu http://www.dotnetfunda.com/images/dnfmvp.gif
select * from tableName where PKColumn not in (select top((select COUNT(*) from tableName ) -2 )PKColumn from tableName)
Ashwini
Login to post response