exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 156 discussion

Actual exam question from Oracle's 1z0-071
Question #: 156
Topic #: 1
[All 1z0-071 Questions]

Examine the description of the PRODUCTS table which contains data:



Which two are true? (Choose two.)

  • A. The PROD_NAME column cannot have a DEFAULT clause added to it.
  • B. The EXPIRY_DATE column cannot be dropped.
  • C. The EXPIRY_DATE column data type can be changed to TIMESTAMP.
  • D. The PROD_ID column can be renamed.
  • E. The PROD_ID column data type can be changed to VARCHAR2(2).
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Bissto
5 months ago
Selected Answer: CD
C. The EXPIRY_DATE column data type can be changed to TIMESTAMP. This is true. In Oracle, you can modify the data type of a DATE column to a TIMESTAMP data type using the ALTER TABLE statement, as long as there are no incompatible data types involved. D. The PROD_ID column can be renamed. This is true. Oracle allows you to rename columns in a table using the ALTER TABLE statement with the RENAME COLUMN clause.
upvoted 1 times
...
ogi33
9 months, 3 weeks ago
ORA-01439: column to be modified must be empty to change datatype D is ok cos the same group of datatype
upvoted 2 times
...
Udhayapriya
1 year ago
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)
upvoted 1 times
...
WingL
1 year, 6 months ago
Selected Answer: 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).
upvoted 2 times
...
Darnun
1 year, 10 months ago
Selected Answer: CD
CD is correct in that case
upvoted 1 times
...
alic_alex
1 year, 11 months ago
Selected Answer: 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"
upvoted 3 times
...
greenneem
1 year, 11 months ago
C works well when i run sql statement.
upvoted 1 times
...
SantiBZ_07032022_1744
1 year, 11 months ago
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)
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago