Hi All,
Today I ran a simple query to pull maximum value from three columns in a table and it is as below
select max(Name) As Name
from
(
Select MAX(A) as name from G Union All Select MAX(B)as name from G Union All Select MAX(C)as name from G
) S
Today I ran a simple query to pull maximum value from three columns in a table and it is as below
select max(Name) As Name
from
(
Select MAX(A) as name from G Union All Select MAX(B)as name from G Union All Select MAX(C)as name from G
) S
Enjoy!
No comments:
Post a Comment