Tuesday, September 13, 2011

Find third heighest o_id from test table.......

select TOP 1 o_id from test where o_id not in(select distinct TOP 2 o_id from test order by o_id DESC) order by o_id desc

0 comments:

Post a Comment