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 are the features and advantages of object-oriented programming? : Sql dba
Write a query to genarate target column.Please answer me. Advance Thanks. Src Tgt Q10 Quarter to 2010 Q90 Quarter to 1990 Q80 Quarter to 1980 Q74 Quarter to 1974
how to load data files into tables with 'mysqlimport'? : Sql dba
If records are inserted into table without committing.How to refer to these values in a procedure?
Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com
what are myisam tables? : Sql dba
What is meant by cursor in sql?
table - new_no old_no 2345 1234 3456 2345 5678 4567 output sud be -new_no 1234 2345 3456 4567 5678
What is the difference between inner join and natural join?
Can we update views in sql?
wht is the difference between sqlaserver2000 and 2005
What is optimistic concurrency control? : Transact sql