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 |
SELECT ROUND(TRUNC(MOD(1600,10),-1),2) FROM dual;
How write primary and foreign key relationship between two tables without using constraints? u can use any of procedure/function/trigger and any sql?
what is a materialized view? : Sql dba
which operator is used in query for pattern matching? : Sql dba
What is input buffer in sql*plus?
How to execute multiple sql statements in a single annonymous block irrespective of the sql statement result?
How consistent is the view of the data between and within multiple sessions, transactions or statements ?
What is difference between cursor and ref cursor?
I have 2 packages A and B. Now package A references Package B and Package B references Package A. How do you compile such inter-dependent objects in PL/SQL
5 Answers Doyensys, Infosys, Metric Stream,
What is string data type in sql?
How do I create an index in word?
Explain the rollback statement?