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


Please Help Members By Posting Answers For Below Questions

Write down the syntax and an example for create, rename and delete index?

622


Which tcl commands are available on the sql server?

679


How can you append an identity column to a temporary table?

523


What is the difference between value type and reference type?

626


How to create indexed view?

644






What happens if null values are involved in arithmetic operations?

673


How efficient you are in oracle and SQL server?

724


What is ems sql management studio? : sql server management studio

662


what are the steps you will take to improve performance of a poor performing query? : Sql server database administration

623


How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?

1402


What is the difference between varchar and varchar types?

646


What kind of problems occurs if we do not implement proper locking strategy?

1047


What is bit data type? What's the information that can be stored inside a bit column?

609


What is transact-sql language?

669


You want your report to display a hyperlink that will take users to your intranet. How do you configure such a hyperlink?

268