Can you explain the different types of joins in SQL and when you would use each?
Use the provided customers and orders tables to demonstrate the behavior of a join that preserves unmatched rows from both tables. Explain how INNER, LEFT, RIGHT, FULL OUTER, CROSS, and self joins differ.
customer_id, customer_name, order_id, order_customer_id, and join_statusorder_id| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer display name |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Customer associated with the order |
| order_status | VARCHAR(30) | Current order status |