SQL Ch 3

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

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

,

The column definition of NUMBER(7, 4) indicates a precision of ____.

7

When modifying data in existing columns, which of the following is correct?

A column must be as wide as the data it already contains.

Which of the following commands can be used to make structural changes to an existing table?

ALTER TABLE

Structure of the CUSTOMERS table. Which of the following commands will increase the size of the CITY column in the CUSTOMERS table from 12 to 20 and increase size of the LASTNAME column from 10 to 14?

ALTER TABLE customers MODIFY (city VARCHAR2(20), lastname VARCHAR2(14));

Which of the following commands will drop any columns marked as unused from the TABLEA table?

ALTER TABLE tablea DROP UNUSED COLUMNS;

Which command instructs Oracle 12c to create a new table?

CREATE TABLE

Which of the following is a valid SQL statement?

CREATE TABLE newname (colA NUMBER, colB DATE);

Structure of the PROMOTION table. Which of the following SQL statements was most likely used to create the PROMOTION table?

CREATE TABLE promotion (gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5, 2));

Which command instructs Oracle 12c to create a new table from existing data?

CREATE TABLE...AS

Which of the following keywords uses a subquery to create a new table using existing database tables?

CREATE TABLE...AS

In which format does Oracle 12c display a date value?

DD-MON-YY

Which of the following SQL*Plus commands will display the structure of a table?

DESC

Which of the following keywords is used to remove a database table in Oracle 12c?

DROP TABLE

Which keywords are used to complete the deletion of a column previously marked with SET UNUSED?

DROP UNUSED COLUMNS

A column name can consist of up to 225 characters.

False

A table must contain a minimum of two columns. _________________________

False

A table name must begin with a(n) number. _________________________

False

An automatic column will generate a value at runtime and may reference values from other columns.

False

DML commands are used to create or modify database tables.

False

The ALTER TABLE name can be used to rename a table.

False

The CREATE TABLE cannot contain a subquery.

False

The DELETE TABLE command can be used to remove a table from a database.

False

The MODIFY TABLE command can be used to change the size of a table.

False

The default size of the CHAR column is 2. _________________________

False

The maximum width of a VARCHAR2 column is 2000 characters.

False

The maximum width of a(n) CHAR column is 4000 characters. _________________________

False

The scale of a NUMBER column indicates the total number of digits that can be stored in the column. _________________________

False

The width of a NUMBER column cannot be changed once it contains data. _________________________

False

To retain the structure of a table, while deleting all its data and releasing their storage space, execute the TRUNC command.

False

Using the DESC on a table will display hidden columns.

False

You cannot specify the width for a(n) NUMBER column. _________________________

False

Which of the following is a valid table name?

MYTABLE

Which of the following rules apply to table names in Oracle 12c?

Names can contain a number sign (#).

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.

TRUNCATE TABLE

A database must be shut down before the ALTER TABLE command can be executed.

True

A database object is a defined, self-contained structure in Oracle 12c.

True

DDL commands are used to create or modify database objects. _________________________

True

The CREATE TABLE command is used to create a table in Oracle 12c. _______________________

True

The DROP COLUMN clause of the ALTER TABLE command can only be used to delete one column at a time. _________________________

True

The precision of a NUMBER does not include the decimal point itself in the total number of digits that can be stored in a column.

True

The scale of a NUMBER column indicates the number of digits that can be displayed to the right of the decimal point.

True

The syntax of the CREATE TABLE command requires that the column list be enclosed in parentheses. _________________________

True

Structure of the PROMOTION table. Which data dictionary object contains a column named HIDDEN_COLUMN?

USER_TAB_COLS.

Which of the following datatypes refers to variable-length character data, where n represents the maximum length of the column?

VARCHAR2(n)

Structure of the PROMOTION table. A _______ column generates values automatically at runtime and may reference values from other columns.

Virtual

Which of the following is displayed by the DESCRIBE command?

all of the above

Structure of the CUSTOMERS table. Which of the following commands will display the structure of the CUSTOMERS table?

both a and b

Which of the following terms refers to commands that are used to create or modify database tables?

data definition language (DDL)

Structure of the CUSTOMERS table. Which of the following commands will change the name of the LAST NAME column to LAST_NAME in the CUSTOMERS table?

none of the above


संबंधित स्टडी सेट्स

INTL LOGISTICS TEST 2 Quiz questions

View Set

Digital Marketing - D098 UNIT FIVE

View Set

Fundamentals ATI Dynamic Quiz Questions

View Set

Higher Business Management - Understanding Business

View Set

transitional words and phrases showing relationships and between sentences

View Set

BHS Ag Mechanics semester 1 exam review

View Set

Introduction to Constitutional Law

View Set