Table Creation and Management

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

The ____________________ datatype is used to store fixed length data.

CHAR

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

CHAR(n)

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

CREATE TABLE

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 of the following keywords can be used to change the size, datatype, and/or default value of an existing column?

MODIFY

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

Structure of the PROMOTION table​ ​ Which of the following commands will change the name of the PROMOTION table to GIFT?

RENAME promotion TO gift

​ Which of the following is a valid table name in Oracle 12c?

S_c#oT#2t_321sM#_i_T6h

​ The ____________________ TABLE command can be used to delete and release the storage space of all data contained in a database table, while still retaining the table's structure.

TRUNCATE

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

USER_TAB_COLS

Which of the following is displayed by the DESCRIBE command?​

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

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

both a and b

​ Each ____________________ name within a table must be unique.

column

​ A column's ____________________ identifies the type of data that can be stored in a column.

data type

A(n) ____ simply identifies the type of data that Oracle 12c will be expected to store in a column.​

datatype

Once a table is ____________________, any associated indexes will be removed from the database.

dropped or deleted

A column name can consist of up to 225 characters.​

false

A table must contain a minimum of two columns. _________________________

false

Data manipulation language commands are used to create or modify database tables. _________________________ ​

false

If the CREATE TABLE is being used to create a table from existing data, the SUBQUERY keyword must be used. ​

false

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

false

The CHANGE TABLE command can be used to modify an existing table. _________________________

false

The CHAR datatype is used to store variable-length data that can consist of letters and numbers. _________________________ ​

false

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

false

The MODIFY clause can be used with the ALTER TABLE command to add a column to an existing table. _________________________ ​

false

The TRUNCATE TABLE command can be used to delete a table from a database. _________________________ ​

false

The data contained in a dropped table can be retrieved if the DROP option was not used in the DROP TABLE command. _________________________ ​

false

The default size of the CHAR column is 2. _________________________ ​

false

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

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

​ The DELETE TABLE command can be used to delete all the data stored in a table and release the storage space, yet retain the structure of the table. _________________________

false

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

​ What is the maximum width that can be assigned to a DATE column?

none of the above

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

object

A CHAR column cannot be resized to a width that is smaller than the data it already contains. ​

true

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

true

A datatype identifies the type of data to be stored in a column. ​

true

SELECT9 is a valid table name

true

Seven bytes are allocated in a DATE column to store the century, year, month, day, hour, minute, and second of a date. _________________________ ​

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 DROP TABLE command can be used to remove a table and all its data from a database.​

true

The INTERVAL datatype can be used to identify a specific interval, or amount, of time.

true

The MODIFY clause can be included in the ALTER TABLE command to add a default value to an existing column. _________________________

true

The USER_TAB_COLS data dictionary object contains a column to identify hidden columns. ​

true

The default format of a DATE column in Oracle 12c is DD-MON-YY. ​

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

You cannot delete the last column in a table. ​

true

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

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

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 of the following keywords cannot be used to modify an existing table?​

​ ALTER TABLE...AS

Which of the following keywords is used to mark a column for deletion at a later time?​

​ ALTER TABLE...SET UNUSED

Which of the following is a valid SQL statement?​

​ CREATE TABLE newname (colA NUMBER, colB DATE);

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

​ CREATE TABLE...AS

Which of the following rules does not apply to column names in Oracle 12c?​

​ Column names can contain an ampersand (&).

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

​ DROP UNUSED COLUMNS

Once a column has been set as UNUSED, which of the following is correct?​

​ It is unavailable and will not be displayed in the table structure.

Structure of the PROMOTION table​ ​ Which of the following commands will change the name of the PROMOTION table to GIFT?

​ RENAME promotion TO gift;

Structure of the PROMOTION table​ Which of the following queries will allow hidden columns to be displayed?​

​ SELECT which specifically references the hidden column.

If a column is defined as NUMBER(5,2), which of the following is true?​

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

When creating a table, which of the following statements is correct?​

​ The column list must be enclosed in parentheses ( ).

When using the ALTER TABLE...DROP COLUMN command, which of the following is not correct?​

​ The command can be used to delete multiple columns from a table.

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​ ​ If a new column is added to the PROMOTION table, where will the new column be listed?

​ after the MAXRETAIL column

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

​ data definition language (DDL)

If a new table is being created based upon a subquery, the subquery must be enclosed in which of the following symbols? ​

( )

The column list of the CREATE TABLE command must be enclosed in ____________________.

( ) or parentheses

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

,

The DROP COLUMN clause of the ALTER TABLE command can be used to drop a maximum of ____________________ column(s) at a time.​

1 or one

The maximum width of the NUMBER datatype is ____ digits.

38

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

7

When adding a column to an existing table, the ____________________ clause must be used with the ALTER TABLE command.​

ADD

The ____________________ command can be used to modify the structure of a table.

ALTER TABLE

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

The ____________________ keyword must be used with the CREATE TABLE command if the table is being created from a subquery.

AS

The structure of a table can be viewed by issuing the STRUCTURE command.​

FALSE

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

DD-MON-YY

_________________________ commands are used to create database objects.

DDL or Data Definition Language

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

DESC

The ____________________ TABLE command can be used to delete a table from a database.

DROP

The ____________________ clause of the ALTER TABLE command can be used to delete a column from an existing table.

DROP COLUMN


Ensembles d'études connexes

Psych Chapter 18: Personality Disorders

View Set

national chap 14: closing real estate transaction instructor questions

View Set

Bus. Law Ch 6 - The Constitution

View Set

03 Grammar: Much / Many / A lot / Lots MC (Click 'Learn')

View Set

Combo with "Church History II Test 3 (Last one!!!)" and 1 other

View Set