Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    50

    Arrow Unanswered: Equivalent of max(a,b)

    Hi

    Is there a function in oracle to find max of two numbers
    max(a,b)

    Thanks.
    Ishan.

  2. #2
    Join Date
    Apr 2002
    Posts
    56
    Yes, it's GREATEST (related to LEAST which gives you the lowest)

    SELECT GREATEST (2,4) from dual
    gives you 4
    Can of course be more than 2 numbers e.g.

    SELECT GREATEST (2,4,9,7) from dual

  3. #3
    Join Date
    Mar 2004
    Posts
    50
    Thanks Edwin.

    Ishan.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •