5 Quiz

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which of the following statements best describes what this INSERT statement does? INSERT INTO invoices_copy SELECT * FROM invoices WHERE terms_id = 1 Adds all of the rows in the Invoices table to the Invoices_Copy table and sets the terms_id column to 1 in each row. Adds one row from the Invoices table to the Invoices_Copy table. Updates all of the rows in the Invoices_Copy table that have 1 in the TermsID column to the rows in the Invoices table. Adds all of the rows in the Invoices table that have 1 in the terms_id column to the Invoices_Copy table.

Adds all of the rows in the Invoices table that have 1 in the terms_id column to the Invoices_Copy table.

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

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

If you code a column list in an INSERT statement that includes a column that's defined with a default value, you can insert the default value for that column by coding the ____________________ keyword in the VALUES clause of the INSERT statement.

DEFAULT

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

DELETE

Write the code for a DELETE statement that deletes every row in the Invoices_Copy table: _______________________________________________________________

DELETE FROM Invoices_Copy

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

NULL

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

SELECT

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') There are too few items in the VALUES list. The column names in the column list are in the wrong sequence. The number of items in the column list doesn't match the number in the VALUES list. There are too many items in the column list.

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

When you code a DELETE statement for one or more rows, the _________________ clause specifies which row or rows are to be deleted.

WHERE

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.

WHERE

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


Conjuntos de estudio relacionados

Linear Algebra Assignments True/False

View Set

Česky krok za krokem 1, lekce 11: Cestování

View Set

practices lesson 10 FHA insured loans

View Set

EXAM - Section 11, Unit 1: Employment and Cooperation Agreements in Arizona

View Set

Chapter 13 (traits and personality)

View Set

Give Me Liberty:Chapter 4 Slavery, Freedom, And The Struggle For Empire, To 1763

View Set