QUIZ: Basic DML

Ace your homework & exams now with Quizwiz!

What will happen when the following query is executed: UPDATE student SET s_class='SR';

All records in the student table will be updated

Based on the contents of the PROMOTION table, which of the following commands will delete only the row for the Free Bookmark from the table?

Correct DELETE FROM promotion WHERE gift = 'BOOKMARKER';

Which of the following commands will delete only publisher 4 from the PUBLISHER table?

Correct DELETE FROM publisher WHERE pubid = 4;

Which of the following is not a valid SQL command?

Correct UPDATE acctmanager WHERE amid = 'J500';

Which of the following commands is used to remove rows from a table?

DELETE

If data is only being added to some of the columns in a table, the names of the columns must be listed in the VALUES clause.

False

If more than one data value is being added to a table, the values must be separated by parentheses.

False

If the WHERE clause is omitted from the UPDATE command, then all columns in the table will be changed.

False

The DROP command can be used to remove rows from an existing table.

False

The MODIFY command can be used to change existing data stored in a table.

False

The VALUES clause of the UPDATE command is used to specify the columns being updated and the new data values.

False

The data being inserted into a table are listed in the ADD clause of the INSERT command.

False

To add data to the database, use the ____ command.

INSERT

Which of the following commands is used to add rows to a table?

INSERT

Which of the following is not a valid SQL command?

INSERT INTO acctmantable AS (SELECT amid, amname, amedate, region FROM acctmanager WHERE amedate <= SYSDATE);

Which of the following SQL statements will insert a new row into the PROMOTION table?

INSERT INTO promotion (gift, minretail, maxretail) VALUES ('FREE BOOK', 75.01, 89.99);

Which of the following statements about the DELETE command is incorrect?

If you omit the mandatory WHERE clause, an error message will be issued.

Which of the following statements about the INSERT keyword is incorrect?

Oracle11 g does not allow column names to be omitted from the INSERT INTO clause.

When the UPDATE command is used to change existing data values, the ____________________ clause is used to specify the new data value and the column being changed.

SET

The ____________________ keyword can be included in the INSERT command to enter the computer's date into the row when it is added to the table.

SYSDATE

A NULL value can be included in the data being added to a table by explicitly entering the word NULL.

True

A subquery can be used with the INSERT command to enter data from an existing table into the destination table.

True

Commands used to modify data are known as DML commands.

True

Data that is being added to a table is specified in the VALUES clause of the INSERT command.

True

The = operator is used by an exact search condition.

True

The UPDATE command can be used to change data stored in a table.

True

The WHERE clause of the DELETE command is used to identify the rows to be deleted from the table.

True

When a subquery is used in the INSERT command, the subquery does not have to be enclosed in parentheses.

True

Which of the following commands is used to add data to an existing row in a table?

UPDATE

Based on the contents of the PROMOTION table, which of the following will correctly change the value assigned to the MAXRETAIL column for Free Shipping to 75.00?

UPDATE promotion SET maxretail = 75 WHERE gift = 'FREE SHIPPING';

Which of the following keywords is omitted from the INSERT command if the data to be added to a table is already contained in another table?

VALUES

A search condition begins with the keyword ____.

WHERE

If a(n) ____________________ clause is not included in the UPDATE command, then all rows in the table will be changed.

WHERE

If the ____ clause of the UPDATE command is omitted, then all the rows in the specified table will be changed.

WHERE

Commands used to modify data are called ____ commands.

data manipulation language (DML)

When non-numeric data is being added to a table, the data must be enclosed in ____________________ quotation marks.

single

When data is being entered into a VARCHAR2 or CHAR column using the INSERT command, the data will be stored in ____.

the same case used in the INSERT command


Related study sets

Physics chapter 15+16 multiple choice

View Set

National RE Practice Exam Wrong Answers

View Set

NUTRI 300: 2.26 Exam #2 - Ch.3 & Ch.4

View Set

Unit 2 practice questions: NURS 172

View Set

Accounting Chapter 12 Vocabulary

View Set

Bates' Advanced Health Assessment Chapters 1-4, & 7 (Health History, HEENT)

View Set