Compare values of column in a table
Can u tell me how we can compare values of column in a table,for example if we have 5 in 1st column,8 in 2nd,and 20 in 3rd,how we can find largest value in column.
Note : This is the question asked by a visitor Navya. I am posting this in proper forum.
Re: Compare values of column in a table
Question definitely requires clarification. You say "Values in [B]a[/B] column" and then you want to compare three columns?
Re: Compare values of column in a table
i dont know la i too have same doubt la. Pls let me know?
Re: Compare values of column in a table
in oracle you can use GREATEST inbuilt function to find the greatest of the multiple values.
Eg:
[code]
SELECT GREATEST(col1,col2,col3) FROM table_name;
[/code]
Re: Compare values of column in a table
Are you talking about columns or rows ???
If rows then you can use the MAX (column_name) function
I don't think you can do anything about finding out maximum amongst multiple columns.