Rewrite the query select * from section natural join classroom without using a natural join but instead using an inner join with a using condition
select *
from section natural join classroom
Solution
Answer
With "USING"
SELECT * FROM SECTION
INNER JOIN CLASSROOM
USING(BUILDING,ROOM_NUMBER);
Screenshot
---
Without "USING"
SELECT * FROM SECTION
INNER JOIN CLASSROOM
ON(SECTION.BUILDING = CLASSROOM.BUILDING
AND
SECTION.ROOM_NUMBER = SECTION.ROOM_NUMBER);
Screenshot
Explanation
First we rewrite the sql code
select * from section natural join classroom
with using
--
Second one without using we rewrite the code
---
all the best
Get Answers For Free
Most questions answered within 1 hours.