database concepts ch 3 5 8

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

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 t

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

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

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 (#).

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

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

,

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...FOR UPDATE

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 O

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

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)

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

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

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

LOCK TABLE

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

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

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.

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

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

COMMIT

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

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

exclusive

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 b

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

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

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

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

SYSDATE

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

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

( )

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

CREATE TABLE

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

RENAME...TO

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 symbols cannot be used in a table name?
_
%
#
none of the above

%

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

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 parenthes

The column list must be enclosed in parentheses ( ).

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

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

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

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

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

SET

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

UPDATE

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

DELETE