MySQL Final Study Guide - Chapters 1 - 11 Quizes

MySQL Final Study Guide - Chapters 1 - 11 Quizes

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

they all use the same amount of storage

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (108)

Section 1

(50 cards)

they all use the same amount of storage

Front

Which uses the least amount of storage? 'example' stored in a column of type CHAR(20) 'exam' stored in a column of type CHAR(20) 'ex' stored in a column of type CHAR(20) they all use the same amount of storage

Back

the likely cause of the error

Front

When you run a SQL statement that contains a coding error, MySQL Workbench displays an error message that does not include an error code brief description of the error the likely cause of the error

Back

each vendor in the table named ia

Front

SELECT i.vendor_id, MAX(i.invoice_total) AS largest_invoice FROM invoices i JOIN (SELECT vendor_id, AVG(invoice_total) AS average_invoice FROM invoices GROUP BY vendor_id HAVING AVG(invoice_total) > 100 ORDER BY average_invoice DESC) ia ON i.vendor_id = ia.vendor_id GROUP BY i.vendor_id ORDER BY largest_invoice DESC When this query is executed, the result table will contain one row for each vendor each vendor in the table named ia each invoice each invoice in the table named ia

Back

'ex' stored in a column of type VARCHAR2(20)

Front

Which uses the least amount of storage? 'example' stored in a column of type VARCHAR2(20) 'exam' stored in a column of type VARCHAR2(20) 'ex' stored in a column of type VARCHAR2(20) they all use the same amount of storage

Back

payment_date IS NOT NULL AND invoice_total >= 500

Front

When coded in a WHERE clause, which search condition will return invoices when payment_date isn't null and invoice_total is greater than or equal to $500? NOT (payment_date IS NULL AND invoice_total <= 500) payment_date IS NOT NULL OR invoice_total >= 500 payment_date IS NULL AND invoice_total > 500 payment_date IS NOT NULL AND invoice_total >= 500

Back

a subquery can't be introduced in this way

Front

If introduced as follows, the subquery can return which of the values listed below? WHERE (subquery) a single value a column of one or more rows a table a subquery can't be introduced in this way

Back

time

Front

The DATETIME data type includes not only the date, but also a ________________________. string value whole number time

Back

a table

Front

If introduced as follows, the subquery can return which of the values listed below? FROM (subquery) a single value a column of one or more rows a table a subquery can't be introduced in this way

Back

can use either aggregate search conditions or non-aggregate search conditions

Front

Expressions coded in the HAVING clause can use either aggregate search conditions or non-aggregate search conditions can use aggregate search conditions but can't use non-aggregate search conditions can use non-aggregate search conditions but can't use aggregate search conditions can refer to any column in the base tables

Back

CAST

Front

The _____________________ function is an ANSI-standard function that you can use to perform an explicit conversion. BREAK FORMAT CAST CONVERT

Back

can use non-aggregate search conditions but can't use aggregate search conditions

Front

Expressions coded in the WHERE clause can use either aggregate search conditions or non-aggregate search conditions can use aggregate search conditions but can't use non-aggregate search conditions can use non-aggregate search conditions but can't use aggregate search conditions must refer to columns in the SELECT clause

Back

WHERE vendor_name < 'D'

Front

Which of the following WHERE clauses will return vendor names from A to C? WHERE vendor_name < 'D' WHERE vendor_name = 'D' WHERE vendor_name < 'C' WHERE vendor_name = D

Back

yyyy-mm-dd

Front

The default date format for MySQL is _________________. mm/dd/yy mon-dd-yyyy yyyy-mm-dd yy/dd/mm

Back

Use comments to describe what each statement does.

Front

Which of the following recommendations won't improve the readability of your SQL statements? Indent continued lines. Break long clauses into multiple lines. Use comments to describe what each statement does. Start each clause on a new line.

Back

a column of one or more rows

Front

If introduced as follows, the subquery can return which of the values listed below? WHERE invoice_total > ALL (subquery) a single value a column of one or more rows a table a subquery can't be introduced in this way

Back

CREATE TABLE

Front

Which of the following types of SQL statements is not a DML statement? UPDATE SELECT CREATE TABLE INSERT

Back

invoice_total - credit_total - payment_total / 10

Front

Which of the following expressions does not compute 10% of the balance due if balance due is the invoice total minus the credit total minus the payment total? ((invoice_total - payment_total) - credit_total) / 10 (invoice_total - payment_total - credit_total) / 10 invoice_total - credit_total - payment_total / 10 (invoice_total - (payment_total + credit_total)) * 0.10

Back

SELECT, FROM, WHERE, ORDER BY

Front

When you code a SELECT statement, you must code the four main clauses in the following order SELECT, FROM, ORDER BY, WHERE SELECT, FROM, WHERE, ORDER BY SELECT, ORDER BY, FROM, WHERE SELECT, WHERE, ORDER BY, FROM

Back

dates only

Front

The DATE data type can store dates only dates and times times only all of the above

Back

subquery select

Front

To insert rows selected from one or more tables into another table with an INSERT statement, you code a/an ___________________________ in place of the VALUES clause. subquery select join close like

Back

COUNT(*)

Front

All of the aggregate functions ignore null values, except for the ______________________________ function. KEY HAVING ERR COUNT(*)

Back

DELETE

Front

By default, MySQL automatically commits changes to the database immediately after each INSERT, UPDATE, and ______________ statement that you issue. ON DELETE AS COMMIT

Back

a single value

Front

If introduced as follows, the subquery can return which of the values listed below? WHERE 2 < (subquery) a single value a column of one or more rows a table a subquery can't be introduced in this way

Back

Forgetting to connect to a database

Front

Which of the following is not a common error when entering and executing SQL statements? Misspelling a keyword Forgetting to connect to a database Selecting the wrong database Misspelling the name of a table

Back

The total unpaid balance due for each vendor_id

Front

Which of the statements below best describes the result set returned by this SELECT statement? SELECT vendor_id, SUM(invoice_total - payment_total - credit_total) AS column_2 FROM invoices WHERE invoice_total - payment_total - credit_total > 0 GROUP BY vendor_id The unpaid balance for each invoice The total unpaid balance due for each vendor_id The total amount invoiced by each vendor_id The total of paid invoices for each vendor_id

Back

a single value

Front

If introduced as follows, the subquery can return which of the values listed below? SELECT (subquery) a single value a column of one or more rows a table a subquery can't be introduced in this way

Back

each vendor with invoice totals over $500

Front

SELECT vendor_state, vendor_city, vendor_name, COUNT(*) AS invoice_qty, SUM(invoice_total) AS invoice_average FROM invoices JOIN vendors ON invoices.vendor_id = vendors.vendor_id WHERE vendor_state < 'e' GROUP BY vendor_state, vendor_city, vendor_name HAVING SUM(invoice_total) > 500 ORDER BY vendor_state, vendor_city, vendor_name (Please refer to code example) When this summary query is executed, the result set will contain one summary row for each city with invoice totals over $500 each vendor with invoice totals over $500 each city with invoice average over $500 each vendor with invoice average over $500

Back

that doesn't include a value for that column is added to the table

Front

If you define a column with a default value, that value is used whenever a row that doesn't include a value for that column is added to the table is added to the table with a zero value for that column is added to the table in the table is updated

Back

one row for each vendor that shows the largest balance due for any of the vendor's invoices, but only if that balance due is larger than the average balance due for all invoices

Front

SELECT vendor_name, COUNT(*) AS number_of_invoices, MAX(invoice_total - payment_total - credit_total) AS balance_due FROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id WHERE invoice_total - payment_total - credit_total > (SELECT AVG(invoice_total - payment_total - credit_total) FROM invoices) GROUP BY vendor_name ORDER BY balance_due DESC When this query is executed, the result set will contain one row for each invoice that has a larger balance due than the average balance due for all invoices one row for the invoice with the largest balance due for each vendor one row for each invoice for each vendor that has a larger balance due than the average balance due for all invoices one row for each vendor that shows the largest balance due for any of the vendor's invoices, but only if that balance due is larger than the average balance due for all invoices

Back

of invoices for each vendor that have a larger balance due than the average balance due for all invoices

Front

SELECT vendor_name, COUNT(*) AS number_of_invoices, MAX(invoice_total - payment_total - credit_total) AS balance_due FROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id WHERE invoice_total - payment_total - credit_total > (SELECT AVG(invoice_total - payment_total - credit_total) FROM invoices) GROUP BY vendor_name ORDER BY balance_due DESC When this query is executed, the number_of_invoices for each row will show the number 1 of invoices in the Invoices table of invoices for each vendor of invoices for each vendor that have a larger balance due than the average balance due for all invoices

Back

The number of vendors in each state that has more than one vendor

Front

Which of the statements below best describes the result set returned by this SELECT statement? SELECT vendor_state, COUNT(*) AS column_2 FROM vendors GROUP BY vendor_state HAVING COUNT(*) > 1 The names of the vendors in each state The duplicate vendors from each state The number of vendors in each state The number of vendors in each state that has more than one vendor

Back

32492.05

Front

All of the following values can be stored in a column that's defined as DECIMAL(6,2), except -246.29 0 2479.95 32492.05

Back

WHERE

Front

When you code an UPDATE statement for one or more rows, the SET clause names the columns to be updated and the values to be assigned to those columns, and the ______________________ clause specifies the conditions a row must meet to be updated. JOIN SELECT GET WHERE

Back

integers

Front

Numbers that don't include a decimal point are known as ____________________. integers real abstract fraction

Back

invoice_total IN (0, 1000)

Front

When coded in a WHERE clause, which of the following search conditions will not return a result set that includes all invoices with an invoice_total value of $1000 or less? invoice_total IN (0, 1000) invoice_total <= 1000 NOT (invoice_total > 1000) invoice_total BETWEEN 0 AND 1000

Back

SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY

Front

The six clauses of the SELECT statement must be coded in the following order: SELECT, FROM, GROUP BY, HAVING, WHERE, ORDER BY SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY SELECT, FROM, ORDER BY, WHERE, GROUP BY, HAVING

Back

create a database diagram

Front

In a SQL Editor tab of MySQL Workbench, you can do all but one of the following. Which one is it? run SQL scripts navigate through database objects create a database diagram code SQL statements

Back

By default, the changes are automatically committed to the database.

Front

Which of the following statements is true when you use MySQL Workbench to run INSERT, UPDATE, and DELETE statements? By default, the changes are automatically committed to the database. If autocommit mode is on you can rollback the changes by clicking on the Rollback button. If autocommit mode is on you can commit the changes by clicking on the Commit button. By default, the changes are rolled back when you exit MySQL Workbench unless you commit them.

Back

total sales

Front

Which of the following isn't a valid column alias? total total sales "Total Sales" total_sales

Back

a result set

Front

The result of a SELECT statement is a stored procedure a calculated value a result set

Back

mushrooms, sausage, peppers

Front

The ENUM data type stores values that are mutually exclusive. Which choice is not appropriate for the ENUM type? small, medium, large yes, no, maybe mushrooms, sausage, peppers cash, credit, debit

Back

implicit

Front

When MySQL automatically converts one data type to another, it's known as a/an ______________________ conversion. implicit complex transmutation switch

Back

SELECT

Front

Which of the following types of statements does not modify the data in a table? SELECT UPDATE INSERT DELETE

Back

You cannot run all of the statements in the script at once.

Front

Which of the following is not true when you're using MySQL Workbench to test a script that contains more than one SQL statement? When you run a script, the results are displayed in the Results tab. You cannot run all of the statements in the script at once. You can run each statement in the script by itself.

Back

a column of one or more rows

Front

If introduced as follows, the subquery can return which of the values listed below? WHERE vendor_id NOT IN (subquery) a single value a column of one or more rows a table a subquery can't be introduced in this way

Back

null

Front

When you code a column list in an INSERT statement, you can omit columns with default values and columns that allow ____________________________ values. string open null quote

Back

balance_due in descending sequence

Front

SELECT vendor_name, COUNT(*) AS number_of_invoices, MAX(invoice_total - payment_total - credit_total) AS balance_due FROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id WHERE invoice_total - payment_total - credit_total > (SELECT AVG(invoice_total - payment_total - credit_total) FROM invoices) GROUP BY vendor_name ORDER BY balance_due DESC When this query is executed, the rows will be sorted by invoice_id vendor_id balance_due in descending sequence vendor_id and then by balance_due in descending sequence

Back

SELECT

Front

You can use the AS keyword with the CREATE TABLE statement to create a copy of a table from a ____________________ statement. SELECT DELETE WHERE LIKE

Back

The number of items in the column list doesn't match the number in the VALUES list.

Front

Assuming that all of the table and column names are spelled correctly, what's wrong with the INSERT statement that follows? INSERT INTO invoices (vendor_id, invoice_number, invoice_total, payment_total, credit_total, terms_id, invoice_date, invoice_due_date) VALUES (97, '456789', 8344.50, 0, 0, 1, '2012-08-31') The column names in the column list are in the wrong sequence. There are too many items in the column list. There are too few items in the VALUES list. The number of items in the column list doesn't match the number in the VALUES list.

Back

data access model communicate with the database

Front

A database driver is software that lets the data access model communicate with the database application program communicate with the database data access model communicate with the application program application program communicate with the data access model

Back

Section 2

(50 cards)

for each vendor with an average invoice total that's greater than 100

Front

Code example SELECT i.vendor_id, MAX(i.invoice_total) AS largest_invoice FROM invoices i JOIN (SELECT vendor_id, AVG(invoice_total) AS average_invoice FROM invoices GROUP BY vendor_id HAVING AVG(invoice_total) > 100 ORDER BY average_invoice DESC) ia ON i.vendor_id = ia.vendor_id GROUP BY i.vendor_id ORDER BY largest_invoice DESC (Please refer to code example 7-2.) When this query is executed, there will be one row for each vendor for each vendor with an average invoice total that's greater than 100 for each vendor with a maximum invoice total that's greater than 100 for each invoice with an invoice total that's greater than the average invoice total for the vendor and also greater than 100

Back

reduces redundancy and makes maintenance easier

Front

To apply the second normal form, you move columns that don't depend on the entire primary key to another table and establish a relationship between the two tables. This reduces redundancy but makes maintenance more difficult reduces redundancy and makes maintenance easier increases redundancy but makes maintenance easier increases redundancy but makes the data more consistent

Back

all of the above

Front

Which of the following is the way to sort a VARCHAR column that contains numbers in numeric sequence? In the ORDER BY clause use the CAST function to convert the column values to numbers add zeros to the column values using + 0 use the LPAD function to pad the numbers with leading zeros all of the above

Back

a single, scalar value

Front

To be in the first normal form, each cell in a table must contain a unique value a non-unique value a single, scalar value a non-redundant value

Back

The column is frequently updated.

Front

Which of the following is not a good guideline for deciding when to create an index for a column? The column is a foreign key. The column is frequently updated. The column is frequently used in search conditions or joins. The column contains a large number of distinct values.

Back

function-based indexes

Front

You can't code which one of the following as part of a CREATE TABLE statement: not null constraints column-level constraints table-level constraints function-based indexes

Back

the smallest practical components

Front

When you identify the data elements in a new database, you typically subdivide data elements into the largest practical components the smallest practical components components that can be easily parsed each time you use them

Back

*

Front

To return all of the columns from the base table, you can code the _______________ operator in the SELECT clause. * TOTAL ALL ?

Back

select

Front

You can combine inner and outer joins within a single ________________ statement. select where using xor

Back

FROM

Front

The __________________ clause of the SELECT statement specifies the table that contains the data. FROM AND OR WHERE

Back

DISTINCT

Front

To prevent duplicate rows from being returned by a SELECT statement, you can code the _____________ keyword in the SELECT clause. DUPLICATE UNIQUE LAST DISTINCT

Back

ewilliam

Front

If first_name contains Edward and last_name contains Williams, what will the solution column contain when this code is executed? LOWER(LEFT(first_name,1) + LEFT(last_name,7)) AS solution EWilliams EWilliam ewilliams ewilliam

Back

index

Front

You should create an _______________ when a column is used frequently in search conditions or joins. DKNF index EER entity

Back

Not, And, Or

Front

The order of precedence for the logical operators in a WHERE clause is Or, And, Not And, Or, Not Not, And, Or Not, Or, And

Back

The result sets must be derived from different tables.

Front

When you code a union that combines two result sets, which of the following is not true? Each result set must have the same number of columns. The corresponding columns in the result sets must have compatible data types. The result sets may or may not have any duplicate rows. The result sets must be derived from different tables.

Back

DATE_FORMAT('2015-04-20', '%W, %M %D, %Y')

Front

Which code returns the date in the format Friday, April 20th, 2015? DATE_FORMAT('2014-04-20', '%W, %M %D, %Y') DATE_FORMAT('2015-04-20', '%m/%d/%y') DATE_FORMAT('2015-04-20', '%W, %M %D, %Y') DATE_FORMAT('2015-04-20', '%e-%b-%y')

Back

the number of rows in the Invoices table

Front

SELECT vendor_name, invoice_number FROM invoices LEFT JOIN vendors ON invoices.vendor_id = vendors.vendor_id The total number of rows returned by this query must equal the number of rows in the Invoices table plus the number of rows in the Vendors table none of the above the number of rows in the Invoices table the number of rows in the Vendors table

Back

is an older syntax that works with legacy code

Front

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 separate the join and search conditions lets you combine inner and outer joins is easier to read and understand is an older syntax that works with legacy code

Back

CONCAT_WS

Front

The _________ function concatenates a string with the specified separator string added in between. LTRIM CONCAT CONCAT_WS SUBSTRING_INDEX

Back

result sets

Front

A union combines the rows from two or more _______________________. SELECT statements result tables queries result sets

Back

WHERE

Front

If you want to filter the rows that are returned by a SELECT statement, you must include a/an ______________ clause. SELECT TABLE WHERE GOTO

Back

vendor_city REGEXP 'NA$'

Front

When coded in a WHERE clause, which of the following would not return rows for vendors in the cities of San Diego and Santa Ana? vendor_city REGEXP '^SA' vendor_city LIKE 'SAN%' vendor_city REGEXP 'NA$'

Back

the largest invoice total related to that row

Front

Code example SELECT i.vendor_id, MAX(i.invoice_total) AS largest_invoice FROM invoices i JOIN (SELECT vendor_id, AVG(invoice_total) AS average_invoice FROM invoices GROUP BY vendor_id HAVING AVG(invoice_total) > 100 ORDER BY average_invoice DESC) ia ON i.vendor_id = ia.vendor_id GROUP BY i.vendor_id ORDER BY largest_invoice DESC (Please refer to code example 7-2.) When this query is executed, each row in the result table will show the largest invoice total related to that row the average invoice total related to that row the largest invoice total related to that row, but only if it's larger than the average for all invoices the average invoice total related to that row, but only if it's greater than 100

Back

CEILING

Front

The __________ function returns the smallest integer that is greater than or equal to the number. FLOOR TRUNCATE SIGN CEILING

Back

a, b, or c

Front

To enforce referential integrity for a delete operation, a MySQL database can return an error instead of deleting any rows set the foreign key values in the related rows to null delete the related rows in the foreign key table a, b, or c a or c

Back

alias

Front

A table _________________ can be used when you want to assign a temporary name to a table. alias widget module label

Back

equal

Front

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

Back

you need to create the referred to tables before you create the tables that refer to them

Front

When you create a script for creating a database: you can create the tables in whatever sequence you prefer you need to create the referred to tables before you create the tables that refer to them you need to create the indexes before you create the tables that they apply to you need to code the primary key column first in each table

Back

-45

Front

If expiration_date contains a value that's equivalent to November 2, 2011 and the SYSDATE function returns a value that's equivalent to December 17, 2011, what will the exp_days column contain when this code is executed? expiration_date - SYSDATE() AS exp_days -45 -1.5 45 1.5

Back

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

Front

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

Back

when the same column names exist in both tables

Front

In a join, column names need to be qualified only in inner joins when the code is confusing in outer joins when the same column names exist in both tables

Back

CREATE TABLE users_copy AS SELECT * FROM users;

Front

Which SQL statement creates a complete copy of the users table call users_copy. SELECT * FROM users INTO users_copy; CREATE COPY users_copy FROM users; CREATE TABLE users_copy AS SELECT * FROM users; DUPLICATE users INTO users_copy;

Back

you code a USING clause in addition to the ON clause

Front

Which is not true about the USING keyword? you code a USING clause in addition to the ON clause the join must be an equijoin, meaning the equals operator is used to compare the two columns it can be used with inner or outer joins you use it to simplify the syntax for joining tables

Back

ROUND(payment_total, 1)

Front

Write the code for a SELECT statement that uses the ROUND function to return the payment_total column with 1 decimal digit. ROUND(payment_total, 1) ROUND(payment) ROUND(decimal) ROUND(total, 1)

Back

real numbers

Front

Numbers that include a decimal point are knows as ____________________. real numbers UNSIGNED ENUM integers

Back

CONCAT

Front

To concatenate character strings, you use the _________________ function in a string expression. WHERE CONCAT &gt;&gt; STRING

Back

Displays five columns for each invoice with the invoice total in one of the last three columns based on how many days have elapsed between the invoice date and the current date.

Front

Which of the following statements best describes what this SELECT statement does? SELECT invoice_number, invoice_date, CASE WHEN (SYSDATE() - invoice_date) >= 30 AND (SYSDATE() - invoice_date) < 60 THEN invoice_total ELSE 0 END AS "30-60", CASE WHEN (SYSDATE() - invoice_date) >= 60 AND (SYSDATE() - invoice_date) < 90 THEN invoice_total ELSE 0 END AS "60-90", CASE WHEN (SYSDATE() - invoice_date) > 90 THEN invoice_total ELSE 0 END AS "Over 90" FROM invoices Displays three columns for each invoice with a value in the third column that indicates how many days have elapsed between the invoice date and the current date. Displays five columns for each invoice with the invoice total in one of the last three columns based on how many days have elapsed between the invoice date and the current date. Displays three columns for each invoice with one of these messages in the third column: 30-60, 60-90, or Over 90. Displays five columns for each invoice with a message in one of the last three columns based on how many days have elapsed between the invoice date and the current date.

Back

combines the result sets of two or more SELECT statements

Front

Like a join, a union combines data from two or more tables. But, instead of combining columns from base tables, a union is coded in the ORDER BY clause combines the result sets of two or more SELECT statements by default, does not eliminate duplicate rows combines columns from the same table

Back

each non-key column must depend only on the primary key

Front

To be in the third normal form, each non-key column must depend only on the primary key each non-key column must not depend on the primary key each non-key column must contain repeating values all of the above

Back

LIMIT 4, 7

Front

Which of the following would return a maximum of 7 rows, starting with the 5th row? LIMIT 4 LIMIT 4, 6 LIMIT 4, 7 LIMIT 7, 4

Back

The column name for the fifth column in the result set doesn't match the data.

Front

SELECT vendor_state, vendor_city, vendor_name, COUNT(*) AS invoice_qty, SUM(invoice_total) AS invoice_average FROM invoices JOIN vendors ON invoices.vendor_id = vendors.vendor_id WHERE vendor_state < 'e' GROUP BY vendor_state, vendor_city, vendor_name HAVING SUM(invoice_total) > 500 ORDER BY vendor_state, vendor_city, vendor_name (Please refer to code example 6-1.) Although this query runs as coded, it contains this logical error: The condition in the WHERE clause should be coded in the HAVING clause. The column name for the fifth column in the result set doesn't match the data. The three columns in the ORDER BY clause should use the DESC keyword so the city totals will be in the right sequence. The condition in the HAVING clause should be coded in the WHERE clause.

Back

use that alias to refer to the table throughout your query

Front

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 qualify all of the column names for that table assign them to all of the tables qualify every column name in the query

Back

summary

Front

A SELECT statement that includes aggregate functions is often called a/an ____________________ query. aggregate SELECT total summary

Back

none of the above

Front

SELECT vendor_name, invoice_number FROM invoices LEFT JOIN vendors ON invoices.vendor_id = vendors.vendor_id 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 Vendors table the number of rows in the Invoices table plus the number of rows in the Vendors table none of the above the number of rows in the Invoices table

Back

use the DATE_ADD function to remove the time values from the dates in each column

Front

Which of the following is not a valid way to avoid search problems when you want to search for rows that have a specific date in a column that's defined with the DATETIME data type? use the MONTH, DAYOFMONTH, and YEAR functions in the WHERE clause to search for just those components search for a range of dates that are greater than or equal to the date you're looking for, and less than the date that follows the date you're looking for use the DATE_FORMAT function in the WHERE clause to return a formatted string that only contains the month, day, and year use the DATE_ADD function to remove the time values from the dates in each column

Back

unmatched rows from both the left and right tables

Front

A full outer join returns unmatched rows from both the left and right tables rows in the left table that don't satisfy the join condition rows in the right table that don't satisfy the join condition the Cartesian product of the two tables

Back

a union

Front

You can simulate a full outer join by using a left outer join a union a self join the ON clause

Back

rows from the second table

Front

In a cross join, all of the rows in the first table are joined with all of the matched rows in the second table unmatched columns in the second table distinct rows in the second table rows from the second table

Back

17

Front

If you TRUNCATE the number 17.99, you get a value of: 18 17 20 17.5

Back

column name, alias, expression, or column number

Front

When you code an ORDER BY clause, you can specify a column name or alias only column name, alias, or expression only column name or expression only column name, alias, expression, or column number

Back

Section 3

(8 cards)

All of the above.

Front

Which is true when you define a column as the primary key? The column is forced to be NOT NULL. The column is forced to contain a unique value for each row. An index is automatically created based on the column. All of the above.

Back

TRUNCATE TABLE

Front

To delete all data from a table without deleting the definition for the table, you use the ______________ statement. RENAME TABLE TRUNCATE TABLE CREATE TABLE DROP TABLE

Back

foreign keys

Front

Which feature does the MyISAM storage engine not support? full-text searches foreign keys spatial data types

Back

All of the above

Front

Which of the following is true about creating indexes? MySQL automatically creates indexes for primary keys. MySQL automatically creates indexes for foreign keys. You can create an index that's based on more than one column. All of the above

Back

one

Front

The latin1 character set uses how many bytes per character? one two three up to three

Back

case-insensitive

Front

In the collation, utf8_spanish_ci, the ci stands for: case-insertion case-insensitive collation-insensitive collation-insertion

Back

the default value is used if another value isn't specified when a row is added to the database.

Front

When you define a column with the DEFAULT attribute: a null value is used if another value isn't specified when a row is added to the database. the default value you specify does not need to correspond with the data type for the column. the default value is used if another value isn't specified when a row is added to the database.

Back

InnoDB

Front

The default storage engine for MySQL 5.5 and later. This engine supports foreign keys and transactions. InnoDB MyISAM both a and b none of the above

Back