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
What is 3nf normalization form?
What is model database in sql server?
What is compression - row-level and page-level compression?
You want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition?
How much memory that we are using in Logshipping Concept?
What’s the use of custom fields in report?
can an automatic recovery be initiated by a user? : Sql server administration
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?
What are the types of dml?
State the difference between union and union all?
What is the fastest way to permanently delete a 1 million row table named customers?
How to execute stored procedure and set temp table in sql server?
1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?
What is attribute relationships, why we need it? : sql server analysis services, ssas