Chapter 4 SQL test

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

You can combine inner and outer joins within a single _______________ statement.

Select

A union combines the rows from two or more _______________________.

Select-statements

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 use the implicit syntax for coding joins, the join conditions are coded in the ____________ clause.

WHERE

You can simulate a full outer join by using

a union

A table ___________________ can be used when you want to assign a temporary name to a table.

alias

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 ____________________________________.

alias

Like a join, a union combines data from two or more tables. But, instead of combining columns from base tables, a union

combines the result sets of two or more SELECT statements

In most cases, the join condition of an inner join uses the _______________ operator to compare two keys

equal

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 _____________________________ syntax.

explicit

In most cases, the join condition of an inner join compares the primary key of one table to the ____________________ key of another table.

foreign

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 __________________ join.

inner

Which of the following is not a reason for using the explicit syntax instead of the implicit syntax for joins? The explicit syntax

is an older syntax that works with legacy code

In a cross join, all of the rows in the first table are joined with all of the

rows from the second table

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.

self

When you use the USING keyword for a join,

the join must be based on a column or columns that have the same name in both tables

SELECT vendor_name, invoice_number FROM invoices LEFT JOIN vendors ON invoices.vendor_id = vendors.vendor_id

the number of rows in the invoices table

A full outer join returns

unmatched rows from both the left and right tables

If you assign an alias to one table in a join, you have to

use that alias to refer to the table throughout your query

In a join, column names need to be qualified only

when the same column names exist in both tables

Which is not true about the USING keyword

you code a USING clause in addition to the ON clause


Set pelajaran terkait

Chapter 16: How Populations Evolve

View Set

INS475 Multiple Choice Questions

View Set

Chapter 16: Nose, Mouth & Throat

View Set

EC#13 Use it, EC#14 Be Resourceful

View Set

CNA 101 - Module 7 - Ethernet Switching

View Set