Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

how to get max value of 4 column

Hi i have one table . in that table 8 column 4 cloumn are numeric cloum . i want to get max value of that 4 cloumn

Fname     lName    tname    country  n1   n2    n3 n4
Sathish    kumar     ML           India     4    8       9    10
Kumar      Siva       ML           inida     7    6        4     12

if i run the query means i want to get  
12   as result

How to get that ??
Sathish David  Kumar N
Sathish David  Kumar N
1 Solution
slightwv (䄆 Netminder) Commented:
select greatest(n1,n2,n3,n4)  from table;

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now