0 votes
1 view
in SQL by (25.5k points)

my query is suppose we have three tables employee , department and building and I want aquery which could fetch me emp_name, phone_no,building name where emp_id=20. so how do i put where condition in the join of three tables?

1 Answer

0 votes
by (42.7k points)

This will do the magic for you.

select emp_name, phone, dep_name, building_name from employee e inner join dep d on e.emp_id = d.emp_id inner join building b on b.building_id = d.building_id;

Related questions

0 votes
1 answer
0 votes
1 answer
+3 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...