Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 152

Examine the description of the PRODUCTS table which contains data:

Which two are true? (Choose two.)

    Correct Answer: C, D

    The EXPIRY_DATE column data type can be changed to TIMESTAMP because though it needs to be empty to change the data type, this is still a valid operation when the table is designed or emptied. The PROD_ID column can be renamed, as renaming columns does not depend on existing data and can be performed without restriction.

Discussion
alic_alexOptions: CD

in case of empty table correct will be C,E,D. But in case of existing data in the table correct will be C,D. Impossible to change datatype. System raise an error: "ORA-01439: column to be modified must be empty to change datatype"

ogi33Options: CD

ORA-01439: column to be modified must be empty to change datatype D is ok cos the same group of datatype

WingLOptions: CD

100% C AND D HAVE A TRY: CREATE TABLE PRODUCTS_156 ( PROD_ID NUMBER(2) NOT NULL, PROD_NAME VARCHAR2(20), EXPIRY_DATE DATE ); INSERT INTO PRODUCTS_156 VALUES (1, 'Product 1', TO_DATE('2023-12-31', 'YYYY-MM-DD')); ALTER TABLE PRODUCTS_156 MODIFY EXPIRY_DATE TIMESTAMP; alter table products_156 rename column prod_id to product_id; alter table products_156 modify product_id varchar(2); (CHANGE DATA TYPE NOT ALLOWED WITH EXISTING DATA IN THE TABLE).

UdhayapriyaOptions: CD

All are true for empty table CREATE TABLE K (ID NUMBER(2) NOT NULL,NAME VARCHAR2(20),EXPIRY_dATE DATE NOT NULL) ALTER TABLE K MODIFY NAME DEFAULT 'TEST' ALTER TABLE K MODIFY EXPIRY_dATE TIMESTAMP ALTER TABLE K RENAME COLUMN ID TO PROD_ID ALTER TABLE K MODIFY PROD_ID VARCHAR2(2)

DarnunOptions: CD

CD is correct in that case

greenneem

C works well when i run sql statement.

SantiBZ_07032022_1744Options: CD

drop table products_156; CREATE TABLE PRODUCTS_156 (PROD_ID NUMBER(2) NOT NULL, PROD_NAME VARCHAR2(20), EXPIRY_DATE DATE); ALTER TABLE PRODUCTS_156 MODIFY EXPIRY_DATE TIMESTAMP; /*C OK*/ alter table products_156 modify prod_id varchar(2); /*E OK*/ alter table products_156 rename column prod_id to product_id; /*D OK*/ desc products_156; Nombre ¿Nulo? Tipo ----------- -------- ------------ PRODUCT_ID NOT NULL VARCHAR2(2) PROD_NAME VARCHAR2(20) EXPIRY_DATE TIMESTAMP(6)