database concepts ch 3 5 8

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following commands is used to remove rows from a table? DELETE DROP REMOVE MODIFY

DELETE

Which of the following symbols cannot be used in a table name? _ % # none of the above

%

Which of the following keywords cannot be used to modify an existing table? ALTER TABLE...ADD ALTER TABLE...DROP COLUMN ALTER TABLE...MODIFY ALTER TABLE...AS

ALTER TABLE...AS

Which keyword permanently saves changed data in a table? COMMIT SAVE UPDATE ADD

COMMIT

Which command instructs Oracle11g to create a new table? CREATE NEW TABLE CREATE TABLE...FROM CREATE TABLE ALTER TABLE

CREATE TABLE

Which of the following is not a valid SQL command? INSERT INTO acctmantable SELECT amid, amname, amedate, region FROM acctmanager WHERE amedate <= SYSDATE; INSERT INTO acctmantable (SELECT amid, amname, amedate, region FROM acctmanager WHERE amedate <= SYSDATE); INSERT INTO acctmantable AS (SELECT amid, amname, amedate, region FROM acctmanager WHERE amedate <= SYSDATE); none of the above

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

If a table already exists, what command would you issue to add copies of existing rows from one table to the other? INSERT command with an UPDATE clause INSERT command with a SET clause INSERT command with a subquery none of the above

INSERT command with a subquery

Which of the following statements about the DELETE command is incorrect? The DELETE command applies to an entire row and cannot be applied to specific columns within a row. The proper command syntax for the DELETE command is DELETE FROM tablename; If you omit the optional WHERE clause, then all the rows in the table will be deleted. If you omit the mandatory WHERE clause, an error message will be issued.

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

Which command is used to prevent other users from making changes to a table? COMMIT COMMIT TABLE BLOCK LOCK TABLE

LOCK TABLE

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

SET

Use the ____ keyword to enter the computer's date as a data value in the INSERT command. SYSTEMDATE DATE SYSDATE COMPDATE

SYSDATE

When creating a table, which of the following statements is correct? The schema of the table must be explicitly stated. A user can have two tables with the same name, as long as the column names are different. The column list must be enclosed in parentheses ( ). Default values cannot be assigned to all columns in a table.

The column list must be enclosed in parentheses ( ).

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

UPDATE

When new rows are being added to a table, the actual data being added are listed in the ____ clause. INSERT INTO DATA VALUES ADD

VALUES

Which of the following is a valid statement? When rows are added to a table, the column names can be omitted if an entry is only being made into the first column. 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. If rows are being added to a table with the UPDATE command, an entry must be made into each column contained in the table. none of the above

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.

Commands used to modify data are called ____ commands. data control language (DCL) data manipulation language (DML) data modification language (DML) data definition language (DDL)

data manipulation language (DML)

A(n) ____ lock will prevent any DDL operations from being performed on the locked table. shared exclusive partial partitioned

exclusive

When the INSERT command is being used to enter data into a non-numeric column, the data must be enclosed in ____. parentheses double quotation marks single quotation marks upper-case letters

single quotation marks

If a new table is being created based upon a subquery, the subquery must be enclosed in which of the following symbols? " " | | ' ' ( )

( )

When defining columns for a table, which of the following symbols is used to separate the column names in the column list? " " , ( ) | |

,

In which format does Oracle10g display a date value? DD-MON-YEAR DAY-MM-YY DD-MM-YY DD-MON-YY

DD-MON-YY

Which of the following keywords can be used to change the size, datatype, and/or default value of an existing column? ADD MODIFY CHANGE RESET

MODIFY

Which of the following rules apply to table names in Oracle11g? Names can contain blank spaces. Names can be up to 225 characters in length. Names can begin with a number. Names can contain a number sign (#).

Names can contain a number sign (#).

Which of the following statements about the INSERT keyword is incorrect? The keywords INSERT INTO are followed by the table name. The VALUES clause identifies the data values that will be inserted into the table. Oracle11g does not allow column names to be omitted from the INSERT INTO clause. If more than one column is listed, column names must be separated by commas.

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

Which command is used to rename a table you own? ALTER TABLE...RENAME ALTER TABLE...SET NAME RENAME...AS RENAME...TO

RENAME...TO

The ____ command can be used to view the contents of a record when it is anticipated that the record will need to be modified. It places a shared lock on the record(s) to be changed and prevents any other user from acquiring a lock on the same record(s). SELECT...LOCK TABLE COMMIT...LOCK TABLE SELECT...FOR UPDATE COMMIT...FOR UPDATE

SELECT...FOR UPDATE

Which of the following is a valid table name in Oracle11g? jimm8 Y%c _5_H76ang S_c#oT#2t_321sM#_i_T6h 2LaN_n23_es#M#m mAU$reE78_&_n1

S_c#oT#2t_321sM#_i_T6h

To delete all the rows in a table and free up the storage space that was occupied by those rows, the ____ command should be used. ALTER TABLE...DELETE TRUNCATE ROWS TRUNCATE TABLE DELETE...FROM

TRUNCATE TABLE

If a column is defined as NUMBER(5,2), which of the following is true? The column can store a total of 7 digits, with 5 on the left side of the decimal point, and 2 on the right. The column can store a total of 7 digits, all of them on the right side of the decimal point. The column can store a total of 5 digits, with 3 on the left side of the decimal point, and 2 on the right. The column can store a total of 5 digits, all of them on the left side of the decimal point.

The column can store a total of 5 digits, with 3 on the left side of the decimal point, and 2 on the right.

Which of the following statements about substitution variables is incorrect? They allow you to add records to a table without issuing the same command again and again. A substitution variable is identified by an ampersand (&) and the variable name. When Oracle10g executes a command with a substitution variable, it will prompt the user to enter a value. The command SET VERIFY OFF will delete all values stored in substitution variables.

The command SET VERIFY OFF will delete all values stored in substitution variables.

When does a COMMIT command explicitly occur? When the user executes COMMIT;. When the user issues a DDL command such as CREATE or ALTER TABLE. When the user executes ROLLBACK;. When the user exists the system.

When the user executes COMMIT;.

When does a COMMIT command implicitly occur? When the user executes COMMIT;. When the user issues a DDL command such as CREATE or ALTER TABLE. When the user executes ROLLBACK;. When the computer loses power unexpectedly.

When the user issues a DDL command such as CREATE or ALTER TABLE.

Which of the following is displayed by the DESCRIBE command? column names not null requirements datatypes all of the above

all of the above

If you are creating a new table from data contained in an existing table, new column names can be specified by including a list of column names ____. before the AS clause after the AS clause in the subquery after the subquery

before the AS clause

Which of the following commands will display the structure of the CUSTOMERS table? DESC customers DESCRIBE customers DSC customers; both a and b

both a and b

Which of the following commands will set the MINRETAIL column of the PROMOTION table as unused? ALTER TABLE promotion SET UNUSED (minretail); ALTER TABLE promotion SET minretail UNUSED; ALTER TABLE promotion SET UNUSED COLUMN minretail; both a and c

both a and c

If you are creating a new table containing four columns from an existing table and want to change the name of one of the columns when it is created in the new table, add a column list containing ____ names in the CREATE TABLE clause. one four five zero

four

A(n) ____ in a SQL command instructs Oracle11g to use a substituted value in place of the variable at the time the command is actually executed. substitution value substitution clause substitution variable substitution condition

substitution variable

A user who is issuing DML commands can save modified data or undo uncommitted changes by issuing ____ statements. transaction control database control data manipulation rollback control

transaction control


Set pelajaran terkait

Chapter 19 - Relationship of Principal and Agent

View Set

Bravery and Resistance: The Diary of Anne Frank Assignment and Quiz

View Set

𝙀𝙑𝙀𝙍𝙔𝙈𝘼𝙉: KINDRED AND COUSIN (317-390)

View Set

Unit 4 - Interests in Real Estate

View Set

7.2.5 - Vulnerability Management Life Cycle (Practice Questions)

View Set