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

Define synonym?

726


What is the difference between Clustered and Non-Clustered Index?

596


Explain differentiate between a having clause and a where clause?

513


In what sequence sql statement is processed?

585


What is sqlcmd?

555






How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?

669


How is sql server used?

544


What is the use of =,==,=== operators?

575


What is a dataset and what are the different types of datasets?

93


Why we need sql server?

557


What is rank function?

601


How to enter binary string literals in ms sql server?

582


Explain trigger and trigger types?

553


Does sql server 2000 clustering support load balancing?

564


List some advantages and disadvantages of stored procedure?

561