WEEK 2

Ace your homework & exams now with Quizwiz!

5. The CREATE TABLE command is used to create a table in Oracle11g. True False

T

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

T

A database object is a defined, self-contained structure in Oracle11g. True False

T

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

T

A fixed-point number contains a specific number of decimal places. True False

T

A primary key is defined using an integrity constraint. True False

T

A table name can be up to 30 characters in length. True False

T

A user schema contains all database objects created by a user. True False

T

DDL commands are used to create or modify database objects. True False

T

Every table name within a specific schema must be unique. True False

T

It is possible to temporarily disable constraints in an Oracle database. True False

T

SELECT9 is a valid table name. True False

T

The CHAR and VARCHAR2 data types store Unicode character data. True False

T

The VARCHAR2 data type can store up to 4,000 characters. True False

T

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 False

T

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

T

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

T

To check that the value entered into a CHAR column is either 'M' or 'F', you would use a check condition constraint. True False

T

To view the column names and data types of the LOCATION table you would type DESCRIBE LOCATION; at the SQL*Plus prompt. True False

T

Using the CHAR data type causes a column value to be padded to the maximum declared size of the column. True False

T

When a column is deleted, the deletion is permanent. True False

T

You cannot delete the last column in a table. True False

T

A(n) ____ number would be best to store a currency value. int char floating-point fixed-point

D

If a new column is added to the PROMOTION table, where will the new column be listed? before the GIFT column after the GIFT column after the MINRETAIL column after the MAXRETAIL column

D

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

D

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

D

SQL command words are also known as ____. Java commands terms code words reserved words

D

The ____ TABLE command is used to modify an existing column's data declaration. CHANGE RESET MODIFY ALTER

D

The ____ constraint specifies whether the user must enter a column for a specific record, or whether the value can be NULL (indeterminate or unknown). INDEF INPUT NULL NOT NULL

D

Which command would be used to delete table x and all foreign key constraints to x? delete x delete x cascade constraints drop x drop x cascade constraints

D

Which of the following commands will add a new column named FIRSTORDERDATE to the CUSTOMERS table to store the date that the customer first placed an order with the company? CREATE COLUMN firstorderdate, DATE TO customers; ALTER TABLE customers ADD COLUMN firstorderdate DATE; ALTER TABLE customers ADD firstorderdate DATE; ALTER TABLE customers ADD (firstorderdate DATE);

D

Which of the following commands will change the name of the LASTNAME column to LAST_NAME in the CUSTOMERS table? ALTER TABLE customers MODIFY lastname to last_name; ALTER TABLE customers CHANGE lastname to last_name; ALTER TABLE customers MODIFY (lastname, last_name); none of the above

D

Which of the following is not created using an integrity constraint? foreign key primary key composite key surrogate key

D

Which of the following is not part of a DDL command? create table ... drop table ... create constraint ... select table_name from ...

D

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

D

Which of the following pieces of information is not displayed by SQL*Plus when an error occurs? a. error line number b. error location c. error code d. suggested correction

D

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

C

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

C

Which of the following data types is used to store variable length ASCII character data? CHAR NCHAR VARCHAR2 NVARCHAR2

C

A NOT NULL constraint is an example of a table constraint. True False

F

A column name can consist of up to 225 characters. True False

F

A composite key is created using a value constraint. True False

F

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

F

DML commands are used to create or modify database tables. True False

F

Given the column declaration name CHAR(5), if a user attempted to store the value "Jonathan" in the name column, only the first 5 characters would be stored. True False

F

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

F

If the column S_ID is the primary key of the STUDENT table, the constraint name would be pk_STUDENT_S_ID according to the constraint naming convention. True False

F

More than one column can be changed at a time with the ALTER TABLE...MODIFY command. True False

F

The ALPHANUMERIC datatype can be used to store characters and numbers to a maximum width of 2000. True False

F

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

F

The CHAR data types stores up to 4,000 characters. True False

F

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

F

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

F

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

F

The SQL command to create a database table is an example of DML. True False

F

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

F

The default size of a VARCHAR2 column is one character. True False

F

The default size of the CHAR column is 2. True False

F

To create a table it is only necessary to specify column names. True False

F

You can change a column data type from VARCHAR2 to NUMBER. True False

F

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

A

When modifying data in existing columns, which of the following is correct? A column must be as wide as the data it already contains. If a NUMBER column already contains data, its precision and scale can be decreased. Changing the default value of a column will change the values of data already in a table. If a NUMBER column is empty, its precision and scale cannot be changed.

A

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)); CREATE TABLE promotion AS (gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5, 2)); CREATE TABLE promotion ADD (gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5, 2)); CREATE TABLE promotion (gift VARCHAR2(15), minretail NUMBER(5, 2), maxretail NUMBER(5, 2);

A

Which of the following datatypes refers to fixed-length character data, where n represents the maximum length of the column? CHAR(n) VARCHAR(n) VARCHAR2(n) LONG

A

Which of the following declarations would be most appropriate for storing a dollar value up to (but not including) $1000? price NUMBER(5,2) price NUMBER(5) price NUMBER(2) price NUMBER

A

Which of the following is not required when creating a table? table size table name column names column data types

A

You use the ____ data type for any column that stores numerical data upon which users may perform arithmetic calculations. NUMBER NUMERIC VAR FLOAT

A

____ constraints define specific data values or data ranges that must be inserted into columns and whether values must be unique or not NULL. Value Integrity Redundancy Range

A

What is the default format for a DATE value? MM/DD/YY DD-MON-YY MM/DD/YYYY MON-DD-YYYY

B

Which of the following commands can be used to make structural changes to an existing table? MODIFY TABLE ALTER TABLE CHANGE TABLE FIX TABLE

B

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

B

____ commands are used to add new database objects. DML DDL DCL XML

B

A(n) ____ simply identifies the type of data that Oracle11g will be expected to store in a column. data definition data format datatype data record

C

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.

C

If a user enters only a time into a DATE column, what will the date portion be set to? January 1, 1970 first day of the current year first day of the current month current date

C

The ____ data type stores variable-length character data. CHAR VARCHAR VARCHAR2 STRING2

C

The maximum width of the NUMBER datatype is ____ digits. 7 30 38 255

C

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

C

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.

C


Related study sets

MIS 330 Ch 9 Review, MIS 330 Ch 11 Review, MIS 330 Ch 12 Review, MIS SAD Final, MIS Data synchronization and dictionaries, Systems Design & Analysis: User Interface Design (CH 9), Systems Analysis and Design Chapter 9, Systems Analysis and Design Cha...

View Set

ADB Chapter 9 - Commercial Package Policy & Commercial Property Coverage

View Set

CFA 34: Financial Statement Analysis: Applications

View Set

Sociology Chapter 10 Gender Stratification

View Set