• raghuldrag (8/17/2012)


    hi friends,

    create table emp(ename varchar(34),job char(33),sal varchar(22))

    insert into emp values('sa','sales','400')

    insert into emp values('ka','manager','4000')

    insert into emp values('sam','Markting','2500')

    insert into emp values('sabu','system','3900')

    in these table model i ve a report now i need to display the 3rd max salry peoples,......like ... when i am entering postion its display the tat postion of max salry..... ve write on single query

    Please use Dense rank on sal for this.

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂