exam questions

Exam 1z0-144 All Questions

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

Exam 1z0-144 topic 1 question 47 discussion

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

Examine the following snippet of code from the DECLARE section of PL/SQL

DECLARE -
Cust_name VERCHAR2 (20) NOT NULL : = Tom Jones:
Same_name cust_name%TYPE:
Which statement is correct about the above snippets of code?

  • A. The SAME_NAME variable inherits only the data type from the CUST_NAME variable.
  • B. The SAME_NAME variable inherits only the data type and default value from the CUST_NAME variable.
  • C. The SAME_NAME variable inherits the data type, constraint, and default value from the CUST_NAME variable.
  • D. The SAME_NAME variable inherits only the data type and constraint from the CUST_NAME variable resulting in an error
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
chaoyuim
Highly Voted 4 years, 9 months ago
D is right. read here. https://docs.oracle.com/cd/B28359_01/appdev.111/b28370/type_attribute.htm#LNPLS01352
upvoted 5 times
...
Paps23
Most Recent 2 years, 3 months ago
D is right if the referenced items is not a column from db it inherits only the data type and constraint (Value with NOT NULL must be declared)
upvoted 1 times
...
CosminCof
4 years, 11 months ago
it should be B
upvoted 1 times
CosminCof
4 years, 11 months ago
sry I was wrong, the answer is C, because %type attribute inherits datatype (always), constraint (if the referenced items is not a column from db) and default value (if the referenced items is not a column from db)
upvoted 2 times
Aditya
2 years, 10 months ago
pls explain why C is correct
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