CSE581_quiz2

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

Which clause specifies the number of rows that should be skipped before rows are returned from the result set?

OFFSET

To return all of the columns from the base table, which wildcard character do you include in the SELECT clause?

*

To concatenate character strings in a string expression, which operator do you use?

+

When you need to code multiple conditions in a join, it's best to

code only join conditions in the ON clause

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

The search condition of a WHERE clause consists of one or more

Boolean expresssions

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

Correlation

To sort the records that are retrieved by a SELECT statement in descending sequence what keyword do you code at the end of the ORDER BY clause?

DESC

To prevent duplicate rows from being returned by a SELECT statement, you can code which keyword in the SELECT clause?

DISTINCT

Correlation names are temporary table names assigned in which clause?

FROM

Which of the following expressions will not compute 10% of the balance due if balance due is the invoice total minus the credit total minus the payment total?

InvoiceTotal - CreditTotal - PaymentTotal / 10

When coded in a WHERE clause, which of the following search conditions will not return a result set that includes all invoices with an InvoiceTotal value of $1000 or less?

InvoiceTotal IN (0,1000)

Which keyword can you use to retrieve rows in which an expression matches a string pattern called a mask?

LIKE

When coded in a WHERE clause, which search condition will return invoices when PaymentDate is not null and InvoiceTotal is greater than or equal to $500?

PaymentDate IS NOT NULL AND InvoiceTotal >= 500

When coded within a SELECT clause, which TOP clause will return a result set consisting of the ten largest InvoiceNumbers?

TOP 10 InvoiceNumber

When you use the implicit syntax for coding inner joins, the join conditions are coded in which clause?

WHERE

Your code will be easier to read if you code the join condition in the ON expression, and the search conditions in the which clause?

WHERE

A combination of column names and operators that evaluate to a single value is called

an expression

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 join is coded using what syntax?

both b and c explicit SQL-92

Unless you assign a ________________, the column name in the result set is the same as the column name in the base table.

column alias

When you code an ORDER BY clause, you can specify a

column name, alias, expression, or column number

SELECT VendorName, InvoiceNumberFROM Invoices LEFT JOIN VendorsON Invoices.VendorID = Vendors.VendorID; (Refer to code example 4-2.) If the LEFT keyword is replaced with the FULL keyword, the total number of rows that are returned must equal

d a.the number of rows in the Invoices table b.the number of rows in the Vendors table c.the number of rows in the Invoices table plus the number of rows in the Vendors table d.none of the above

A union combines the rows from two or more what? a.queries b.SELECT statements c.result tables d.all of the above

d. all of the above (queries + SELECT + result 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

To override the order of precedence in an arithmetic expression, you can use

parentheses

A full outer join includes rows that satisfy the join condition, plus

rows in both tables that don't satisfy the join condition

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

rows in the second table

In a join, column names only need to be qualified where?

when the same names are used in both tables


Set pelajaran terkait

PT 3: Immunizations & Influenza (EXAM 6) *25 EASYGENERATOR QUESTIONS*

View Set

Lab 14 (sem 2) - Acid-base balance

View Set

Med surge--> Inflammation (basically a fill in the blank of the entire chapter)

View Set

Holt McDougal World History chapter 5 section 1-5, 6th grade -Ancient Civilizations through the Renaissance

View Set