Chapter 3

9 September 2022
4.7 (114 reviews)
20 test answers

Unlock all answers in this set

Unlock answers (16)
question
C. A table can contain a maximum of 1000 columns
answer
Which of the following is a correct statement? A. You can restore the data deleted with the DROP COLUMN clause, but not the data deleted with the SET UNUSED clause B. You can't create empty tables -- all tables must contain at least three rows of data C. A table can contain a maximum of 1000 columns D. The maximum length of a table name is 265 characters
question
C. CREATE TABLE newtable AS (SELECT * FROM customers);
answer
Which of the following is a valid SQL statement? A. ALTER TABLE secustomersspent ADD DATE lastorder; B. ALTER TABLE secustomerorders DROP retail; C. CREATE TABLE newtable AS (SELECT * FROM customers); D. ALTER TABLE drop column;
question
A. A table can be modified only if it doesn't contain any rows of data
answer
Which of the following is not a correct statement? A. A table can be modified only if it doesn't contain any rows of data B. The maximum number of characters in a table name is 30 C. You can add more than one column at a time to a table D. You can't recover data contained in a table that has been truncated.
question
D. All of the above are valid statements
answer
Which of the following is not a valid SQL statement? A. CREATE TABLE anothernewtable (newtable ID VARCHAR2(2)); B. CREATE TABLE anothernewtable (date, anotherdate) AS (SELECT orderdate, shipdate FROM orders); C. CREATE TABLE anothernewtable (firstdate, seconddate) AS (SELECT orderdate, shipdate FROM orders); D. All of the above are valid statements
question
D. If you add a column to an existing table, it's always added as the last column of the table.
answer
Which of the following is true? A. If you truncate a table, you can't add new data to the table B. If you change the default value of an existing column, all existing rows containing a NULL value in the same column are set to the new DEFAULT value C. If you delete a column from a table, you can't add a column to the table with the same name as the previously deleted column. D. If you add a column to an existing table, it's always added as the last column of the table.
question
D. CREATE TABLE newtable (cola NUMBER(3), colb NUMBER(3), colc AS (cola+colb));
answer
Which of the following commands creates a new table containing a virtual column? A. CREATE TABLE newtable AS (SELECT order#, title, quantity, retail FROM orders); B. CREATE TABLE newtable (price NUMBER(3), total NUMBER(8,2)); C. CREATE TABLE newtable (calc1 NUMBER(4), calc2 NUMBER(4); D. CREATE TABLE newtable (cola NUMBER(3), colb NUMBER(3), colc AS (cola+colb));
question
B. ALTER TABLE secustomerorders DROP UNUSED COLUMNS;
answer
Which of the following commands drops any columns marked as unused from the SECUSTOMERORDERS table? A. DROP COLUMN FROM secustomerorders WHERE column_status= UNUSED; B. ALTER TABLE secustomerorders DROP UNUSED COLUMNS; C. ALTER TABLE secustomerorders DROP (unused); D. DROP UNUSED COLUMNS;
question
C. Using the SET UNUSED clause allows you to free up storage space used by a column.
answer
Which of the following statements is correct? A. A table can contain a maximum of only one column marked as unused. B. You can delete a table by removing all columns in the table. C. Using the SET UNUSED clause allows you to free up storage space used by a column. D. None of the above statements are correct.
question
B. TRUNCATE TABLE secustomerorders;
answer
Which of the following commands removes all data from a table but leaves the table's structure intact? A. ALTER TABLE secustomerorders DROP UNUSED COLUMNS; B. TRUNCATE TABLE secustomerorders; C. DELETE TABLE secustomerorders; D. DROP TABLE secustomerorders;
question
A. RENAME oldname TO newname;
answer
Which of the following commands changes a table's name from OLDNAME to NEWNAME? A. RENAME oldname TO newname; B. RENAME table FROM oldname TO newname; C. ALTER TABLE oldname MODIFY TO newname; D. CREATE TABLE newname (SELECT * FROM oldname);
question
D. None- there's no default width for a VARCHAR2 field
answer
The dafault width of a VARCHAR2 field is: A. 1 B. 30 C. 255 D. None- there's no default width for a VARCHAR2 field
question
A. You can change the name of a table only if it doesn't contain any data
answer
Which of the following is not a valid statement? A. You can change the name of a table only if it doesn't contain any data B. You can change the length of a column that doesn't contain any data C. You can delete a column that doesn't contain any data D. You can add a column to a table
question
A. _
answer
Which of the following characters can be used in a table name? A. _ B. ( C. % D. !
question
B. All data in a table can be recovered from the recycle bin if the table is dropped.
answer
Which of the following is true? A. All data in a table can be recovered if the table is dropped with the PURGE option. B. All data in a table can be recovered from the recycle bin if the table is dropped. C. All data in a table is lost if the table is dropped. D. All of the above statements are true.
question
D. ALTER TABLE customers DROP UNUSED COLUMNS;
answer
Which of the following commands is valid? A. RENAME customer# TO customernumber FROM customers; B. ALTER TABLE customers RENAME customer# TO customernum; C. DELETE TABLE customers; D. ALTER TABLE customers DROP UNUSED COLUMNS;
question
D. CREATE TABLE newname (col1 DATE DEFAULT SYSDATE, col2 VARCHAR2(1));
answer
Which of the following commands creates a new table containing two columns? A. CREATE TABLE newname (col1 DATE, col2 VARCHAR2); B. CREATE TABLE newname AS (SELECT title, retail, cost FROM books); C. CREATE TABLE newname (col1, col2); D. CREATE TABLE newname (col1 DATE DEFAULT SYSDATE, col2 VARCHAR2(1));
question
B. DATE9
answer
Which of the following is a valid table name? A. 9NEWTABLE B. DATE9 C. NEW"TABLE D. None of the above are valid table names
question
D. NUMBER
answer
Which of the following is a valid datatype? A. CHAR3 B. VARCHAR4(3) C. NUM D. NUMBER
question
C. USER_TAB_COLUMNS
answer
Which object in the data dictionary enables you to verify DEFAULT column settings? A. DEFALUT_COLUMNS B. DEF_TAB_COLUMNS C. USER_TAB_COLUMNS D. None of the above
question
B. ALTER TABLE books MODIFY (title VARCHAR2(35));
answer
Which of the following SQL statements changes the size of the Title column in the BOOKS table from the current length of 30 characters to the length of 35 characters? A. ALTER TABLE books CHANGE title VARCHAR(35); B. ALTER TABLE books MODIFY (title VARCHAR2(35)); C. ALTER TABLE books MODIFY title (VARCHAR2(35)); D. ALTER TABLE books MODIFY (title VARCHAR2(+5));