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 we can refresh the view?

1167


What is a View ? Can we insert, Update and delete a view?

1067


How do I know if localdb is running?

1001


What is the difference between writing data to mirrored drives versus raid5 drives

992


What is the difference between for xml raw and for xml auto?

1086


What are the drawbacks of reporting in ssrs?

159


Difference between group by clause and having clause in SQL?

1030


What is snapshot replication?

1103


What is the difference between join and inner join?

1074


Can binary strings be converted into numeric or float data types?

1104


What is the function of sql server agent windows service?

1153


How do I determine how many instances of sql server are installed on a computer?

1061


What is service broker?

1068


How much does sql server 2016 cost?

1164


what are defaults? : Sql server database administration

1167