C is the correct answer. Checked by using Oracle Live SQL.
At first, it appears A is the correct answer. It is the correct answer if our employees table was empty. However, re-reading the question, it says the table has 100 rows. Therefore, option A when run on a table that has data gives an error - "ORA-01758: table must be empty to add mandatory (NOT NULL) column ".
on the other hand, option C works perfectly well if the table has 0 rows or 100 rows.
Correct answer is C:
a) SQL> alter table product
2 add salary number (8,2) not null;
alter table product
*
ERROR at line 1:
ORA-01758: table must be empty to add mandatory (NOT NULL) column
c) SQL> alter table product
2 add
3 salary number(8,2) default 0 not null;
upvoted 1 times
...
...
...
This section is not available anymore. Please use the main Exam Page.1z0-061 Exam Questions
Log in to ExamTopics
Sign in:
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.
webdata
3 years, 4 months agobongtrader
4 years, 5 months agoBrasil
5 years, 1 month agoLif
5 years, 7 months agocnyce
6 years agoAndy840
5 years, 10 months agoluizyto
5 years, 9 months ago