QUIZ: Basic DML

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

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

DELETE

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

DELETE FROM publisher WHERE pubid = 4;

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

False

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

All records in the student table will be updated

If one of the data values being entered into a table by the INSERT command violates an existing constraint, the remaining portion of the row will be added, but the data violating the constraint will need to be added at a later time using the UPDATE command

FALSE

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

INSERT

The column to be updated by the UPDATE command is specified in the ____ clause.

SET

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

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 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

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

True

The WHERE clause of the UPDATE command is used to specify exactly which rows should be changed

True

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

True

The ____________________ command is used to add data to an existing row in a table

UPDATE

The ____________________ command is used to change data stored in a table.

UPDATE

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

UPDATE

Which of the following commands is used to modify existing data 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';

The data values being added to a table with the INSERT command must be listed in the ____________________ clause.

VALUES

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

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

WHERE

The row(s) to be updated by the UPDATE command is specified by the ____ clause

WHERE

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);

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

Which of the following is a valid statement?

When rows are added to a table, the column names can be omitted if the values are listed in the same order as the columns are listed in the table.

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

Which of the following is not a valid SQL command?

Correct UPDATE acctmanager WHERE amid = 'J500';

______________________________ commands are used to modify data.

DML

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

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);

Based on the contents of the PUBLISHER table, which of the following will add a new record to the table?

INSERT INTO publisher (pubid, name) VALUES (6, 'BOOKS MADE CHEAP');

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

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

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

What will happen if you try to use the INSERT command to insert a NULL value into a column that has been assigned a PRIMARY KEY constraint

An error message is returned and the row is not added to the table.

When inserting a row into a table, how can you indicate that a row contains a NULL value?

both a and b

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

When you use the insert command, you must specify column names

FALSE

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';

Rows can be deleted from a table using the ____________________ command

DELETE

If the WHERE clause is omitted from the DELETE command, then all columns from the database table will be dropped.

FALSE

If you omit the search condition in the delete query no record will be deleted

FALSE

Only one search condition may be listed in a WHERE clause

FALSE

The INSERT command is used to modify existing data in a row.

FALSE

When data is added to a database table, it is automatically converted to upper-case letters.

FALSE

When including a subquery in an INSERT command, the syntax of enclosing the subquery in parentheses is mandatory

FALSE

When the column names are listed in the INSERT INTO clause of the INSERT command, the order of the names must exactly match the order of the data values in the UPDATE clause

FALSE

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.

If no value is assigned to a column when a row is added to a table, the column will contain a NULL value

TRUE

The VALUES clause is not included with the INSERT command if the data is being retrieved from another table.

TRUE

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

The mandatory WHERE clause identifies the specific row(s) to be changed by the UPDATE command.

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

Which of the following will allow a user to enter a NULL value using the INSERT command?

all of the above


Conjuntos de estudio relacionados

Bio 108 Master Biology 9 - Chapter 15

View Set

Clep Microeconomics Practice Exam 1

View Set

Campbell Biology: Chapters 8-10 and 40 Test Preparation

View Set

Module 2 - Bonding and Chemical Nomenclature

View Set

Chapter 6: An Introduction to Metabolism

View Set

(Comm 89) Social Cognitive theory: Maddux

View Set

DOD Cyber Awareness Challenge 2019: Knowledge Check Questions

View Set