Database Concepts Ch 3 5 8

25 July 2022
4.7 (114 reviews)
39 test answers

Unlock all answers in this set

Unlock answers (35)
question
Which of the following commands will display the structure of the CUSTOMERS table? DESC customers DESCRIBE customers DSC customers; both a and b
answer
both a and b
question
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.
answer
The column can store a total of 5 digits, with 3 on the left side of the decimal point, and 2 on the right.
question
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
answer
TRUNCATE TABLE
question
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 (#).
answer
Names can contain a number sign (#).
question
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
answer
before the AS clause
question
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
answer
ALTER TABLE...AS
question
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
answer
MODIFY
question
When defining columns for a table, which of the following symbols is used to separate the column names in the column list? " " , ( ) | |
answer
,
question
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
answer
SELECT...FOR UPDATE
question
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.
answer
The command SET VERIFY OFF will delete all values stored in substitution variables.
question
Commands used to modify data are called ____ commands. data control language (DCL) data manipulation language (DML) data modification language (DML) data definition language (DDL)
answer
data manipulation language (DML)
question
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.
answer
When the user executes COMMIT;.
question
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
answer
substitution variable
question
Which command is used to prevent other users from making changes to a table? COMMIT COMMIT TABLE BLOCK LOCK TABLE
answer
LOCK TABLE
question
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
answer
single quotation marks
question
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
answer
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.
question
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
answer
transaction control
question
Which keyword permanently saves changed data in a table? COMMIT SAVE UPDATE ADD
answer
COMMIT
question
When new rows are being added to a table, the actual data being added are listed in the ____ clause. INSERT INTO DATA VALUES ADD
answer
VALUES
question
A(n) ____ lock will prevent any DDL operations from being performed on the locked table. shared exclusive partial partitioned
answer
exclusive
question
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.
answer
Oracle11g does not allow column names to be omitted from the INSERT INTO clause.
question
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.
answer
If you omit the mandatory WHERE clause, an error message will be issued.
question
Use the ____ keyword to enter the computer's date as a data value in the INSERT command. SYSTEMDATE DATE SYSDATE COMPDATE
answer
SYSDATE
question
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
answer
S_c#oT#2t_321sM#_i_T6h
question
If a new table is being created based upon a subquery, the subquery must be enclosed in which of the following symbols? " " | | ' ' ( )
answer
( )
question
Which command instructs Oracle11g to create a new table? CREATE NEW TABLE CREATE TABLE...FROM CREATE TABLE ALTER TABLE
answer
CREATE TABLE
question
Which command is used to rename a table you own? ALTER TABLE...RENAME ALTER TABLE...SET NAME RENAME...AS RENAME...TO
answer
RENAME...TO
question
In which format does Oracle10g display a date value? DD-MON-YEAR DAY-MM-YY DD-MM-YY DD-MON-YY
answer
DD-MON-YY
question
Which of the following symbols cannot be used in a table name? _ % # none of the above
answer
%
question
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
answer
four
question
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.
answer
The column list must be enclosed in parentheses ( ).
question
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
answer
both a and c
question
Which of the following is displayed by the DESCRIBE command? column names not null requirements datatypes all of the above
answer
all of the above
question
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
answer
INSERT command with a subquery
question
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.
answer
When the user issues a DDL command such as CREATE or ALTER TABLE.
question
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
answer
INSERT INTO acctmantable AS (SELECT amid, amname, amedate, region FROM acctmanager WHERE amedate <= SYSDATE);
question
The column to be updated by the UPDATE command is specified in the ____ clause. UPDATE SET WHERE COL
answer
SET
question
Which of the following commands is used to add data to an existing row in a table? ADD UPDATE INSERT MODIFY
answer
UPDATE
question
Which of the following commands is used to remove rows from a table? DELETE DROP REMOVE MODIFY
answer
DELETE