Tezt 2 Flashcards
By default, all duplicate values are included in an aggregate calculation unless you specify which keyword?
DISTINCT
What do MIN and MAX correlate to in reference to non numeric data?
MIN is alphabetical order a-z
MAX is alphabetical order z-a
Expressions coded in the HAVING clause__________________
can use either aggregate search conditions or non-aggregate search conditions
can use non-aggregate search conditions but can’t use aggregate search conditions
can use aggregate search conditions but can’t use non-aggregate search conditions
can refer to any column in the base table
can use either aggregate search conditions or non-aggregate search conditions
A search condition in the ________________ clause is applied before the rows are grouped while a search condition in the _________________ clause isn’t applied until after the grouping.
WHERE
HAVING
How do WHERE clause expressions react to aggregate and non-aggregate search conditions
can use non-aggregate search conditions but can’t use aggregate search conditions
These six clauses of a SELECT statement must be coded in which order?
SELECT, FROM, ORDER BY, WHERE, GROUP BY, HAVING
SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY
A correlated subquery is one that _______________
is executed once for each row in the outer query
A subquery is a/an ______________ statement that’s coded within another SQL statement.
ORDER BY
SELECT
FROM
WHERE
select
- A subquery can sometimes be restated as _______________
A join
Which operator can you use to test whether any rows are returned by a subquery?
EXISTS
Subqueries can be ________________ within other subqueries.
anchored
grandfathered
joined
nested
nested
Which of the following statements deletes every row in the Vendors table?
DELETE Vendors WHERE ALL;
DELETE * Vendors;
DELETE ALL Vendors
DELETE Vendors;
DELETE Vendors;
If you omit the WHERE clause from a DELETE statement __________
Show answer choices
all columns in the table will be deleted
all rows in the table will be deleted
only rows with null values will be deleted
the table definition will be deleted
all rows in the table will be deleted
When you code an UPDATE statement for one or more rows, the SET clause specifies the new data for the specified columns and the _________________ clause specifies which row or rows are to be updated.
WHERE
MERGE
HAVING
ORDER B
WHERE
In an UPDATE statement, you can use a ________________ in the FROM clause if you need to specify column values or search conditions that depend on data from a table other than the one named in the UPDATE clause.
join
table
column
subquery
join