Please match the keyword or operator from the list below to its correct SQL explanation and syntax in the table
Please match the keyword or operator from the list below to its correct SQL explanation and syntax in the table.
Replace ? with a correct option from the following list: Right outer join, UNION, Left outer join, Cartesian product, Inner join, Full outer join
Keyword/Operator |
Explanation |
Syntax |
? |
Combine tables vertically |
SELECT * FROM <table 1> UNION SELECT * FROM <table 2>; |
? |
Produces all possible combinations of rows from the two tables |
SELECT * FROM <table name 1>, <table name 2>; |
? |
Only matching rows are returned |
SELECT * FROM <table name 1>, <table name 2> WHERE <join condition> <AND other conditions> <other CLAUSES>;
SELECT * FROM <table name 1> ON join-condition <other clauses>; |
? |
Includes all rows from the left table and inserts NA for non-matching rows |
SELECT * FROM <table name 1> LEFT JOIN <table name 2> ON <join condition> <other clauses> |
? |
Includes all rows from the right table and inserts NA for non-matching rows |
SELECT * FROM <table name 1> RIGHT JOIN <table name 2> ON <join condition> <other clauses> |
? |
Includes all rows from both tables and inserts NA for non-matching rows |
SELECT * FROM <table name 1> FULL JOIN <table name 2> ON <join condition> <other clauses> |
Step by step
Solved in 2 steps