Question
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
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 cant create empty tablesall 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.
2. 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 *;
3. Which of the following is not a correct statement? a. A table can be modified only if it doesnt 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 cant recover data contained in a table that has been truncated.
4. Which of the following is not a valid SQL statement?
a. CREATE TABLE anothernewtable (newtableid 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. 5. Which of the following is true?
a. If you truncate a table, you cant 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 cant 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, its always added as the last column of the table. 6. 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 (calcl NUMBER(4), calc2 NUMBER(4);
d. CREATE TABLE newtable (cola NUMBER(3), colb NUMBER(3), cole AS (cola+colb));
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;
8. 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.
9. Which of the following commands removes all data from a table but leaves the tables structure intact?
a. ALTER TABLE secustomerorders DROP UNUSED COLUMNS; b. TRUNCATE TABLE secustomerorders; c. DELETE TABLE secustomerorders;
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;
8. 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.
9. Which of the following commands removes all data from a table but leaves the tables structure intact?
a. ALTER TABLE secustomerorders DROP UNUSED COLUMNS; b. TRUNCATE TABLE secustomerorders; c. DELETE TABLE secustomerorders;
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;
8. 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.
9. Which of the following commands removes all data from a table but leaves the tables structure intact?
a. ALTER TABLE secustomerorders DROP UNUSED COLUMNS; b. TRUNCATE TABLE secustomerorders; c. DELETE TABLE secustomerorders;
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;
8. 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.
9. Which of the following commands removes all data from a table but leaves the tables structure intact?
a. ALTER TABLE secustomerorders DROP UNUSED COLUMNS; b. TRUNCATE TABLE secustomerorders; c. DELETE TABLE secustomerorders;
b. TRUNCATE TABLE secustomerorders; c. DELETE TABLE secustomerorders; d. DROP TABLE secustomerorders;
10. Which of the following commands changes a tables 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); 11. The default width of a VARCHAR2 field is:
a. 1 b. 30 c. 255 d. Nonetheres no default width for a VARCHAR2 field.
12. Which of the following is not a valid statement? a. You can change the name of a table only if it doesnt contain any data. b. You can change the length of a column that doesnt contain any data. c. You can delete a column that doesnt contain any data. d. You can add a column to a table.
13. Which of the following characters can be used in a table name?
a.
b. (
c. %
d. !
14. 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.
15. 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;
16. Which of the following commands creates a new table containing two columns?
a. CREATE TABLE newname (coll DATE, col2 VARCHAR2);
b. CREATE TABLE newname AS (SELECT title, retail, cost FROM books);
c. CREATE TABLEnewname (coll, col2);
d. CREATE TABLE newname (coll DATE DEFAULT SYSDATE, col2 VARCHAR2(1));
17. Which of the following is a valid table name? a. 9NEWTABLE b. DATE9 c. NEWTABLE
d. None of the above are valid table names.
18. Which of the following is a valid datatype?
a. CHAR3
b. VARCHAR4(3)
c. NUM
d. NUMBER
19. Which object in the data dictionary enables you to verify DEFAULT column settings?
a. DEFAULT_COLUMNS
b. DEF_TAB_COLUMNS
c. USER_TAB_COLUMNS
d. None of the above
20. 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));
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started