Join 3 tables (table1, table2 & table3) in a single query.
Inner join should be applied for table1 & table 2 and left
outer join for table1 & table3 where table2.dept is ABC
Answer Posted / dhanasekaran
select *
from table1 t1
inner join table2 t2 on t1.key = t2.key
left outer join table3 t3 on t1.key = t3.key
where t2.dept ='ABC'
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
Why use update_statistics command in sql server?
How to return the top 5 rows from a select query in ms sql server?
What is the difference between ddl and dml?
What is the primary use of the model database?
What are the dmvs?
Tell me about pre-defined functions of sql?
what are the core components of SSRS?
What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?
Can sub report data source be different from that of the parent report?
What are the disadvantages of merge replication?
What are the properties of primary key?
Explain an incremental backup?
What does it mean to be in union?
which backup strategy you are following at ur company
How to create a stored procedure with a statement block in ms sql server?