nubee sql question.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nubee

    nubee sql question.

    I have a table with first_name, last_name, salary, other_columns. I can
    produce sql to print the max salary but only with the salary column. How
    do I get first_name and last_name etc to show with the max(salary).

    Thanks


  • John Gilson

    #2
    Re: nubee sql question.

    "nubee" <nospan@please. org> wrote in message news:3EC976AC.2 C4B4E16@please. org...[color=blue]
    > I have a table with first_name, last_name, salary, other_columns. I can
    > produce sql to print the max salary but only with the salary column. How
    > do I get first_name and last_name etc to show with the max(salary).
    >
    > Thanks
    >
    >[/color]

    SELECT *
    FROM T
    WHERE salary = (SELECT MAX(salary) FROM T)

    Regards,
    jag


    Comment

    • nubee

      #3
      Re: nubee sql question.

      Thanks alot John, that's was just what I needed.


      John Gilson wrote:
      [color=blue]
      > "nubee" <nospan@please. org> wrote in message news:3EC976AC.2 C4B4E16@please. org...[color=green]
      > > I have a table with first_name, last_name, salary, other_columns. I can
      > > produce sql to print the max salary but only with the salary column. How
      > > do I get first_name and last_name etc to show with the max(salary).
      > >
      > > Thanks
      > >
      > >[/color]
      >
      > SELECT *
      > FROM T
      > WHERE salary = (SELECT MAX(salary) FROM T)
      >
      > Regards,
      > jag[/color]

      Comment

      Working...