Explain SQL inner join vs outer join.
Asked in the Phone round 2 stage. Translated.
Using the destinations and reviews tables, write a query that demonstrates outer-join behavior by preserving rows that lack a match in either table.
destination_id, destination_name, review_id, review_destination_id, rating, and join_status.matched, destination_only, or review_only.destination_id, then review_id; place review-only rows last.| Column | Type | Description |
|---|---|---|
| destination_idPK | INT | Unique destination identifier |
| destination_name | VARCHAR(100) | Name of the destination |
| country_code | VARCHAR(2) | Two-letter destination country code |
| Column | Type | Description |
|---|---|---|
| review_idPK | INT | Unique review identifier |
| destination_id | INT | Destination referenced by the review |
| rating | INT | Review rating from one to five |
| review_title | VARCHAR(150) | Short review title |