4 Quiz

25 July 2022
4.7 (114 reviews)
21 test answers

Unlock all answers in this set

Unlock answers (17)
question
A full outer join returns rows in the right table that don't satisfy the join condition rows in the left table that don't satisfy the join condition unmatched rows from both the left and right tables the Cartesian product of the two tables
answer
unmatched rows from both the left and right tables
question
A table BLANK can be used when you want to assign a temporary name to a table.
answer
alias
question
A union combines the rows from two or more BLANK.
answer
Select statements
question
Code example 4-1 SELECT vendor_name, invoice_date FROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id (Refer to code example 4-1.) This type of join is called a/an BLANK join.
answer
inner
question
????Code example 4-1 SELECT vendor_name, invoice_date FROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id (Refer to code example 4-1.) This join is coded using the BLANK syntax.
answer
explicit
question
Code example 4-1 SELECT vendor_name, invoice_date FROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id (Refer to code example 4-1.) The "v" in this example is known as a/an BLANK.
answer
Alias
question
???Code example 4-2 SELECT vendor_name, invoice_number FROM invoices LEFT JOIN vendors ON invoices.vendor_id = vendors.vendor_id (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 the number of rows in the Vendors table the number of rows in the Invoices table plus the number of rows in the Vendors table none of the above
answer
the number of rows in the Invoice table
question
???Code example 4-2 SELECT vendor_name, invoice_number FROM invoices LEFT JOIN vendors ON invoices.vendor_id = vendors.vendor_id (Refer to code example 4-2.) If the LEFT keyword is replaced with the RIGHT keyword, the total number of rows that are returned must equal the number of rows in the Invoices table the number of rows in the Vendors table the number of rows in the Invoices table plus the number of rows in the Vendors table none of the above
answer
NOT the number of rows in the vendors table NOT The number of rows in the invoice table plus the number of rows in the vendors table
question
If you assign an alias to one table in a join, you have to qualify every column name in the query assign them to all of the tables use that alias to refer to the table throughout your query qualify all of the column names for that table
answer
use that alias to refer to the table throughout your query
question
In a cross join, all of the rows in the first table are joined with all of the unmatched columns in the second table matched rows in the second table rows from the second table distinct rows in the second table
answer
rows from the second table
question
In a join, column names need to be qualified only when the same column names exist in both tables in outer joins in inner joins when the code is confusing
answer
when the same column names exist in both tables
question
In most cases, the join condition of an inner join compares the primary key of one table to the BLANK key of another table.
answer
Foreign
question
In most cases, the join condition of an inner join uses the BLANK operator to compare two keys.
answer
Equal
question
Like a join, a union combines data from two or more tables. But, instead of combining columns from base tables, a union by default, does not eliminate duplicate rows is coded in the ORDER BY clause combines the result sets of two or more SELECT statements combines columns from the same table
answer
Combined the result set of two or more SELECT statements
question
When you code a union that combines two result sets, which of the following is not true? The corresponding columns in the result sets must have compatible data types. Each result set must have the same number of columns. The result sets may or may not have any duplicate rows. The result sets must be derived from different tables.
answer
The result set must be derived from different tables
question
When you use the USING keyword for a join the join can't be an outer join the join can't be done on more than one column the join must be based on a column or columns that have the same name in both tables the join must be an inner join
answer
The join must be based on a column or columns that have the same name in both tables
question
When you use the implicit syntax for coding joins, the join conditions are coded in the BLANK clause.
answer
Where
question
Which is not true about the USING keyword? you code a USING clause in addition to the ON clause you use it to simplify the syntax for joining tables it can be used with inner or outer joins the join must be an equijoin, meaning the equals operator is used to compare the two columns
answer
You code a USING clause in addition to the ON clause
question
Which of the following is not a reason for using the explicit syntax instead of the implicit syntax for joins? The explicit syntax lets you combine inner and outer joins is easier to read and understand lets you separate the join and search conditions is an older syntax that works with legacy code
answer
Is an older syntax that works with Legacy code
question
You can combine inner and outer joins within a single BLANK statement.
answer
Select
question
You can simulate a full outer join by using a left outer join a self join a union the ON clause
answer
A union