i have 2 table table one 4 columns respective values a1
7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values
a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same
then 4th column values 1)Qes diff >5 then print 5 * diff
value 2)Que diff <5 print 5
Answer / anithaletchumi
select t1.name,case when abs(t1.val-t2.val) > 5 then 5 *
abs(t1.val - t2.val) else 5 end diff from tab1 t1 join tab2 t2
on t1.name=t2.name where t1.val != t2.val
| Is This Answer Correct ? | 1 Yes | 0 No |
How does one use sql*loader to load images, sound clips and documents? : aql loader
What are the types of variables use in pl sql?
what is the difference between join and union? : Sql dba
query to retrive the employees whose sal is greater than avg sal
What is sql in oracle?
how to saw triggers output in pl/sql database?
How is use pl and sql?
what is inline view?
write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba
Is sql between inclusive?
Why does %isopen return false for an implicit cursor?
What is the difference between database trigger and stored procedure?
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)