Oracle Database 12c: Installation and Administration — Question 188
Examine the following command:
CREATE TABLE (prod_id number(4),
Prod_name varchar2 (20),
Category_id number(30),
Quantity_on_hand number (3) INVISIBLE);
Which three statements are true about using an invisible column in the PRODUCTS table? (Choose three.)
Answer options
- A. The %ROWTYPE attribute declarations in PL/SQL to access a row will not display the invisible column in the output.
- B. The DESCRIBE commands in SQL *Plus will not display the invisible column in the output.
- C. Referential integrity constraint cannot be set on the invisible column.
- D. The invisible column cannot be made visible and can only be marked as unused.
- E. A primary key constraint can be added on the invisible column.
Correct answer: A, B, E
Explanation
The statements A and B are correct because invisible columns do not appear in %ROWTYPE declarations or in the output of DESCRIBE commands. Statement E is also true as a primary key constraint can be added to an invisible column. However, C and D are incorrect; referential integrity constraints can be set on invisible columns, and invisible columns can be made visible using the ALTER TABLE command.