column A column b | output
10 7 | 10
5 8 | 8
7 -9 | 7
3 5 | 5
0 6 | 6
Write a sql query to print such output.
Answers were Sorted based on User's Feedback
Answer / apoorva garg
select a,b,
CASE WHEN (a>b) THEN a
ELSE b
END output
from a
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / satish tadepalli
select greatest(nvl(cola,0),nvl(colb,0)) from tablename
Is This Answer Correct ? | 6 Yes | 1 No |
select A,B,greatest(A,B) output from <tablename>
Is This Answer Correct ? | 2 Yes | 0 No |
cursor types? explain with example programs?
What does cursor do in sql?
Do foreign keys improve performance?
Is a foreign key always unique?
Which is better join or subquery?
In what condition is it good to disable a trigger?
i want insert 10 records from table a to table b. if i m using statement level trigger how many record insert ?in row level trigger how many record inserted???
3 Answers Scope International,
Explain alias in sql?
How do we tune the code?
Can we rollback delete command?
What is a pragma statement?
when is the use of update_statistics command? : Sql dba