Select last or any position record in sql select statement

Another intresting trick to select last or any position record using sql select stament.
select max(numberField) from TableName
where salary not in (select max(numberField) from TableName);

select *
from TableName testName
where 2 = (select count(*) from TableName b where a.salary <>

1 comments:

Shekhar said...

I didn't got this query :(

Can you explain more ?