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...

Their are two tables 'A' and'B'.Table 'A' contains 3 columns
named 'eid','ename','dept'.
Table 'B'contains 3 columns
named'sid','designation','salary'.
We have to retrieve the names of employees working in the
same department,same designation and same salary.
Its urgent can anyone help me out in this problem.

Answer Posted / litmus rav

If there is many to many relationship between two tables
then this will work,

you need to create thired table name A_B with attributes
eid references A(eid),sid references B(sid)

SELECT * FROM A,B,A_B WHERE A.eid=A_B.eid AND B.sid=A_B.sid
AND ORDER BY ename;

Is This Answer Correct ?    4 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you would rewrite the sql query to return the customerid sorted numerically?

935


Explain how to send email from sql database?

972


What is coalesce in sql server?

992


Can truncate be rolled back?

884


Can you roll back the ddl statement in a trigger?

912


What are the different authentication modes in sql server? How can it be changed?

1021


Define outer join?

927


What is awe?

947


Does windows server 2016 come with sql server?

876


How to use user defined functions in expressions?

1005


What is sql or structured query language?

1085


What are dml triggers and types of dml triggers?

920


Why I am getting this error when dropping a database in ms sql server?

1015


How can we call UDF(User Define Function) using C# code in ASP.net ?

6795


What is the difference between drop table and truncate table?

872