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
what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
Explain what are the authentication modes in sql server?
How do I setup a sql server database?
What are the database objects? : SQL Server Architecture
what is a mixed extent? : Sql server administration
Explain the working of sql privileges?
List the data types available in mssql?
How will you optimize a stored procedure optimization?
What are database states in ms sql server?
Are there any preferred steps that need to be taken care of before starting the installation of sql server 2000?
Define Wed Edition in SQL Azure?
Does hive support indexing?
Explain time data type in sal server 2008?
What are exact numeric data types in ms sql server?
How many types of built in functions are there in sql server 2012?