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


Please Help Members By Posting Answers For Below Questions

which backup strategy you are following at ur company

1730


What functions can a view be used to performed?

618


Describe in brief authentication modes in sql server.

564


what is a correlated sub-query? : Sql server database administration

482


What is the use of custom fields in report?

560






How can sql server instances be hidden? : sql server security

596


What is table value parameters (tvp)?

541


How many null values we can have in a unique key field in sql server?

553


How to configure odbc dsn with different port numbers?

557


What is resource governor in sql server?

544


Explain trigger classes i.e. Instead of and after trigger?

487


List out what other servers you can use with ssrs?

92


What is an index in sql?

550


What is msdb database? : SQL Server Architecture

536


How to retrieve field values using mssql_result()?

628