Filters
Question type

Study Flashcards

When a subquery is used in a SQL statement _____.


A) the subquery is evaluated first
B) a temporary table is created and displayed
C) the outer query is evaluated first
D) only the subquery can include a WHERE clause

Correct Answer

verifed

verified

What SQL command do you use to query a database?


A) WHERE
B) SELECT
C) FROM
D) SET

Correct Answer

verifed

verified

Which function determines the number of rows in a table?


A) ROW
B) CALCULATE
C) COUNT
D) NUMBER

Correct Answer

verifed

verified

The GROUP BY clause sorts the data in a particular order.

Correct Answer

verifed

verified

What does the following SQL query do? SELECT INVOICE_NUM FROM INVOICE_LINE WHERE PROD_CODE IN (SELECT PROD_CODE FROM PRODUCTS WHERE (PROD_TYPE = 'Cupcake') ) ;


A) cause an error because it includes more than one SELECT command
B) lists all rows from the invoice line table that contain a "Cupcake" type product
C) lists the invoice numbers for invoices containing line items with a "Cupcake" product type
D) lists the product codes for all "Cupcake" type products that appear on invoices

Correct Answer

verifed

verified

Which operator finds rows that do not contain a null value in the specified column?


A) IS NULL
B) NOT NULL
C) !NULL
D) IS NOT NULL

Correct Answer

verifed

verified

Imagine that you are working with a MySQL table called ADDRESS_BOOK with the following columns: FIRST_NAME, LAST_NAME, STREET_ADDRESS, CITY, STATE, ZIP_CODE, and BIRTHDAY. Write queries to (1) list all rows missing the ZIP code value and (2) list all rows that include a birthday value.

Correct Answer

verifed

verified

SELECT * FROM ADDRESS_BOOK WHE...

View Answer

Which operator uses one or more wildcard characters to test for a pattern match?


A) PATTERN
B) LIKE
C) MATCH
D) SIMILAR

Correct Answer

verifed

verified

All SELECT statements require a WHERE clause.

Correct Answer

verifed

verified

Which clause is used to restrict the groups that will be included in a query result?


A) LIKE
B) HAVING
C) WHERE
D) HAVE

Correct Answer

verifed

verified

When you need to sort data on two columns, the less important column is called the _____.


A) double sort key
B) primary sort key
C) minor sort key
D) foreign sort key

Correct Answer

verifed

verified

Mallory would like to display the rows from a MySQL table that have "Red," "Pink," or "White" in the COLOR column. A concise way of writing her query would be to use a(n) _____.


A) LIKE clause
B) CONTAINS clause
C) BETWEEN clause
D) IN clause

Correct Answer

verifed

verified

Which of the following operators can be used for a column computation?


A) +
B) ^
C) **
D) +, ^, and **

Correct Answer

verifed

verified

In MySQL, you can use an asterisk (*) to represent any column when using the _____.


A) SUM function
B) COUNT function
C) MAX function
D) MIN function

Correct Answer

verifed

verified

It is possible to place one query inside another.

Correct Answer

verifed

verified

Showing 21 - 35 of 35

Related Exams

Show Answer