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 |
describe transaction-safe table types in mysql : sql dba
Can we create table in function?
Explain UNION,MINUS,UNION ALL, INTERSECT?
How do you copy a table in sql?
explain normalization concept? : Sql dba
explain the delete statements in sql
What are the different type of joins in sql?
Can you upgrade sql express to full sql?
What is mutating error?
Is ms sql traffic encrypted?
What is assignment operator in pl sql?
how to create a database in oracle?please gve anser with example
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)