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

What is the difference between online clustering and Offline clustering?

1910


What is the simplest way to create a new database in ms sql server?

527


Explain DBCC?

566


How to apply filtering criteria at group level with the having clause in ms sql server?

551


Explain trigger and its types?

606






Explain what are the authentication modes in sql server?

496


What is Service Broker in sql server 2012?

616


What is the meaning of lock escalation and why/how to stop this? : sql server database administration

597


What are system databases in ms sql server?

529


Which command is used for user defined error messages?

553


Describe the left outer join & right outer join. : sql server database administration

579


Can we store videos inside the sql server table?

515


Are all views updatable ?

718


What is the process of indexing?

508


What are the essential components of sql server service broker?

556