Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How to make conditional sum in ssrs?

173


Your table has a large character field there are queries that use this field in their search clause what should you do?

850


Explain the steps to create and execute a user-defined function in the sql server?

917


What are the commands used in DCL?

964


What is a join in sql? What are the types of joins?

1005


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?

1264


What is mssql?

926


How does SSIS(Sql Server Integration Services) deffer from DTS(Data Transformation Services)?

1130


What are different replication agents and what's their purpose? : sql server replication

957


What is the difference between seek predicate and predicate?

986


Explain the properties of sub-query in sql server?

953


Can you pass expressions to stored procedure parameters?

967


What are the types of containers in ssis?

1091


How to write a query with an inner join in ms sql server?

996


What is the difference between implicit and explicit transaction?

959