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 |
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..
if we give update table_name set column_name= default. what will happen?
What is varray in pl sql?
What is right join in sql?
What is native sql query?
What is the plv (pl/vision) package offers?
What is a string data type in sql?
What is faster join or subquery?
how to Update table Sales_summary with max(sales) data from table sales_dataTable 1. sales_data table Table 2. Sales_summary Region sales Region sales N 500 N 0 N 800 W 0 N 600 W 899 W 458 W 900 I want the Sales_summary After Update like this Region Sales N 800 W 900
how to use in conditions? : Sql dba
How to avoid duplicate records in a query?
What is the difference between UNIQUE KEY and UNIQUE INDEX?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)