Exam 2
A union combines the rows from two or more _______________________.
Query
A full outer join includes rows that satisfy the join condition, plus
Rows in both tables that don't satisfy the join condition
In most cases, the join condition of an inner join uses the _______________ operator to compare two keys.
Equal
In most cases, the join condition of an inner join compares the primary key of one table to the ____________________ key of another table.
Foreign
If you want to join all of the rows in two tables whether or not they are matched, you use a/an _______________ join.
Full Outer
Code example 4-1 SELECT VendorName AS Vendor, InvoiceDate AS Date FROM Vendors AS V JOIN Invoices AS I ON V.VendorID = I.VendorID (Refer to code example 4-1.) This type of join is called a/an __________________ join.
Inner
If you want to join all of the rows in the first table of a SELECT statement with just the matched rows in a second table, you use a/an _______________ join.
Left Outer
When you code a union that combines two result sets, which of the following is not true?
The result sets must be derived from different tables.
When you code a union with the INTERSECT keyword to combine two result sets, the union
includes only rows that occur in both result sets
You don't ever need to code a right outer join because
right outer joins can be converted to left outer joins
In a cross join, all of the rows in the first table are joined with all of the
rows in the second table
Code example 4-2 SELECT VendorName, InvoiceNumber FROM Invoices LEFT JOIN Vendors ON Invoices.VendorID = Vendors.VendorID (Refer to code example 4-2.) The total number of rows returned by this query must equal
the number of rows in the Invoices table
In a join, column names need to be qualified only
when the same names are used in both tables