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
What the different components in replication and what is their use?
Write a program using SQL queries to find a unique entry in a table.
How to implement service broker?
1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do
Explain DBCC?
How can you start sql server in different modes?
How can we rewrite sub-queries into simple select statements or with joins?
what is memory-optimized nonclustered indexes
What is the order in which the sql query is executed?
What is difference between drop truncate and delete?
How to create a Master database in SQL server ?
How to enable/disable indexes?
How do I open port 1433?
What is bit data type?
How use inner join in sql server?