Tuesday, September 13, 2011

Find Last Five record from table without sorting in sql.

select * from test where o_id not in (select top ((select count(*) from test) - 5) o_id from test)

0 comments:

Post a Comment