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 many sql are there?
Can we group by two columns in sql?
What is a recursive join sql?
display null value rows with out using null function?
Which is better join or subquery?
what is global temporary tables and how use that tables in pl/sql packages
What are tuples in sql?
What are the two types of exceptions.
Which are sql * plus commands?
give the syntax of grant and revoke commands? : Sql dba
What is the main reason behind using an index?
What is a temporal table?