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 / jayesh sonawane
this one correct try it:
SELECT
distinct
B.NAMES AS NAMES
B.SID
,B.DEPT AS DEPARTMENT
,B.SALARY AS SALARY
,B.DESIGNATION AS DESIGNATION
FROM TABLEB AS A join TABLEB AS b
on A.EID=B.SID and B.DEPT=A.DEPT and B.SALARY=A.SALARY and B.DESIGNATION =A.DESIGNATION
join TABLEA as taba on ON A.taba =B.SID
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to make conditional sum in ssrs?
Your table has a large character field there are queries that use this field in their search clause what should you do?
Explain the steps to create and execute a user-defined function in the sql server?
What are the commands used in DCL?
What is a join in sql? What are the types of joins?
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
What is mssql?
How does SSIS(Sql Server Integration Services) deffer from DTS(Data Transformation Services)?
What are different replication agents and what's their purpose? : sql server replication
What is the difference between seek predicate and predicate?
Explain the properties of sub-query in sql server?
Can you pass expressions to stored procedure parameters?
What are the types of containers in ssis?
How to write a query with an inner join in ms sql server?
What is the difference between implicit and explicit transaction?