Database D&D CH 7

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

To insert several rows into a table, you can code an INSERT statement with multiple value lists that are separated by what? A) a backslash B) a semi-colon C) a colon D) a comma

D) a comma

You can code a subquery A) in the SET clause to return the value that's assigned to a column B) in the FROM clause to identify the rows that are available for update C) in the WHERE clause to provide one or more values used in the search condition D) all of the above

D) all of the above

You can use a ________________ in the ________________ clause if you need to specify column values or search conditions other than the one named in the UPDATE clause. A) table, FROM B) column, WHERE C) join, WHERE D) join, FROM

D) join, FROM

When you code a column list in an INSERT statement, you can omit identify columns, columns that have default values, and columns that allow __________ values. A) time B) date C) string D) null

D) null

If you code a column list in an INSERT statement that includes a column that has a default value, which keyword can you code in the VALUES clause to use the default value? A) DEFAULT B) NULL C) VALUE D) none of the above

A) DEFAULT

Write the code for a DELETE statement that deletes every row in the Vendors table A) DELETE Vendors; B) DELETE Vendors WHERE ALL; C) DELETE * Vendors; D) none of the above

A) DELETE Vendors;

When you code a DELETE statement for one or more rows, which clause specifies which row or rows are to be deleted? A) WHERE B) USING C) HAVING D) MERGE

A) WHERE

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. A) WHERE B) HAVING C) ORDER BY D) MERGE

A) WHERE

Which of the following statements best describes what this INSERT statement does? INSERT INTO InvoiceArchive SELECT * FROM Invoices WHERE TermsID = 1; A) Adds one row from the Invoices table to the InvoiceArchive table. B) Adds all of the rows in the Invoices table that have 1 in the TermsID column to the InvoiceArchive table. C) Adds all of the rows in the Invoices table to the InvoiceArchive table and sets the TermsID column to 1 in each row. D) Updates all of the rows in the InvoiceArchive table that have 1 in the TermsID column to the rows in the Invoices table.

B) Adds all of the rows in the Invoices table that have 1 in the TermsID column to the InvoiceArchive table.

If you omit the WHERE clause from a DELETE statement A) the table definition will be deleted B) all rows in the table will be deleted C) all columns in the table will be deleted D) none of the above

B) all rows in the table will be deleted

You can't update A) a column value B) an identity column C) a row D) one or more rows

B) an identity column

When you use the SELECT INTO statement, the result set that's defined by the SELECT statement is ________________ a new table. A) moved into B) copied into C) updated in D) deleted from

B) copied into

To insert several rows selected from another table into a table, you can code an INSERT statement with a/an ______________ in place of the VALUES clause. A) summary query B) subquery C) WHERE clause D) HAVING clause

B) subquery

You can use the DELETE statement to delete one or more rows from the table you name in the ________________ clause. A) WHERE B) FROM C) DELETE D) HAVING

C) DELETE

You use the UPDATE statement to modify one or more rows in the table named in the ________________ clause. A) INSERT B) FROM C) UPDATE D) WHERE

C) UPDATE

You specify the conditions that must be met for a row to be deleted in the which clause? A) FROM B) HAVING C) WHERE D) ORDER BY

C) WHERE

When you use the SELECT INTO technique to create tables A) only the column definitions and data are copied B) primary keys, foreign keys, and default values aren't retained C) a and b D) none of the above

C) a and b

If you use ________________ in the select list, you must name the column since that name is used in the definition of the new table. A) aggregate functions B) foreign keys C) calculated values D) indexes

C) calculated values

Since the MERGE operation often involves updating existing rows and inserting new rows, the MERGE statement is sometimes referred to as what? A) the insate statement B) the magic statement C) the upsert statement D) the dessert statement

C) the upsert statement

In the INSERT statement that follows, assume that all of the table and column names are spelled correctly, that none of the columns are identity columns, and that none of them have default values or accept null values. What's wrong with the statement? INSERT INTO InvoiceCopy (VendorID, InvoiceNumber, InvoiceTotal, PaymentTotal, CreditTotal, TermsID, InvoiceDate, InvoiceDueDate) VALUES (97, '456789', 8344.50, 0, 0, 1, '2016-08-01'); A) The column names in the column list are in the wrong sequence. B) The values are in the wrong sequence. C) There are zeroes in the VALUES list. D) The number of items in the column list doesn't match the number in the VALUES list.

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


Conjuntos de estudio relacionados

Small Business Management Chapter 12

View Set

Unit 4: Sensation and Perception

View Set

Chapter 9 Competition & Monopolies

View Set

Q/Christian Faith and Living - Unit 1: Knowing Yourself

View Set

NCLEX Urinary Practice Questions

View Set

Textbook questions OB Exam 3 chapters 18, 19, 20, 21, 22, 23, 25, 30, 31, 33, 34, 35, 36, and 37

View Set