simple query

  • Hi

    Well I have a table employeemst which has the employeeid,employeename,salaray fields.

    Now I want to find out the name of the employee who is having the maximum salary. I know this is pretty simple but how do I go about it.

     

    One way is to

    select top 1 employeename from employeemst order by salaray desc

     

    is this the best way to do it or is there any other way out.

  • select employeename from employeemst where salaray = (select max(salaray) from employeemst.

    ur way seems to be good enough though

    "Keep Trying"

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply