Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colum..

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

Post New Answer

More SQL PLSQL Interview Questions

What is the syntax to add a record to a table?

0 Answers  


How do I create a memory optimized filegroup?

0 Answers  


What is the largest value that can be stored in a byte data field?

0 Answers  


Which nosql database is best?

0 Answers  


what is self-join? : Sql dba

0 Answers  


Can any one tell me how to increase the performance of a sql query ie what are the performance tips in creating or writing a sql query !!?

3 Answers   eBay,


What is sql rowcount?

0 Answers  


Which is faster joins or subqueries?

0 Answers  


Is it possible to sort a column using a column alias?

0 Answers  


What is sql*plus?

0 Answers  


what are enums used for in mysql? : Sql dba

0 Answers  


What is data types in sql?

0 Answers  


Categories