>
EXPLAIN PLAN FOR
SELECT s.student_id, s.first_name, e.course_name
FROM students s
INNER JOIN enrollments e ON s.student_id = e.student_id;
Conclusion
Before creating a view that joins two tables, a student must understand:
- Table relationships and primary/foreign keys
- SQL join types (INNER, LEFT, RIGHT, FULL OUTER)
- The syntax and purpose of views
- Performance implications and restrictions on updatable views
Create a view that joins two tables. Given the following two tables, create a view that will join them, based on CustomerID,
and present them as if they were a single table.
CustomerInfo
CustomerID |
Lastname |
Firstname |
Address |
City |
State |
ZipCode |
PhoneNumbers