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 |
what is rollback? : Sql dba
hi..........i m Accenture employee...Accenture is an IT company having itz branches in India at Mumbai, Pune,Delhi, Hyderabad, Chennai and Bangalore....Presently there are openings here for SAP, Testing, Oracle,Java,.NET,MAinframe and Peoplesoft...... I am a software engineer working with Accenture,Mumbai....u can mail me in your resume..i`ll forward it to our HR team...my mail id: pankit.lodaya@accenture.com
what is the different between now() and current_date()? : Sql dba
What is the difference between an inner join and an outer join?
what is global table
What is meant by Join? What are the different types of Joins available? Explain.
What is the difference between stored procedure and view?
Why procedure is used in sql?
How does stored procedure reduce network traffic?
what are string data types? : Sql dba
what is meant by forward declaration in functions?
What are few of the schema objects that are created using PL/SQL?