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
Difference Between ORDER BY Clause and GROUP BY Clause in SQL?
Which joins are sql server default?
What is merge join?
Explain what are sparse columns?
How do you manipulate data?
What is exporting utility?
You have modified 100 store procedures and want to replicate these changes from development to prodution, and production can have users using the Server/DB, how would you replicate without causing issues?
Explain the etl (extraction, transformation, and loading)?
What is a file group?
What is use of attribute hierarchy optimized state? : sql server analysis services, ssas
How to stop a loop early with break statements in ms sql server?
What is the difference between a primary key and a unique key? Are they the same?
Explain forward - only cursors?
What is the difference between Stored Procedures and triggers?
What are data resources?