1Z0-083 · Question #275
Choose the best answer. Examine this configuration: 1. CDB1 is a container database. 2.DEFAULT_SHARING is METADATA. 3. APP_ROOT is an application root contained in CDB1. 4. APP_PDB1 is an…
The correct answer is D. It will return an error because EMP is not empty in APP_ROOT. Option D is correct because ALTER TABLE emp ADD (sal NUMBER NOT NULL) - recorded during the upgrade in APP_ROOT - is replayed against APP_PDB1 when SYNC executes. Oracle cannot add a NOT NULL column without a DEFAULT clause to a table that already contains rows; existing rows…
Question
Options
- ASAL will be added to APP_PDB1.EMP, with 0 in columns of existing rows.
- BSAL will be added to APP_PDB1.EMP, with NULLs in columns of existing rows.
- CIt will return an error because the SYNC operation is not allowed when constraints are added
- DIt will return an error because EMP is not empty in APP_ROOT.
- EIt will return an error because EMP.SAL is empty in APP_ROOT.
How the community answered
(62 responses)- A8% (5)
- B3% (2)
- C3% (2)
- D69% (43)
- E16% (10)
Explanation
Option D is correct because ALTER TABLE emp ADD (sal NUMBER NOT NULL) - recorded during the upgrade in APP_ROOT - is replayed against APP_PDB1 when SYNC executes. Oracle cannot add a NOT NULL column without a DEFAULT clause to a table that already contains rows; existing rows would have no valid value for SAL, violating the constraint, so the SYNC operation raises an error.
Why the distractors fail:
- A & B are impossible: Oracle never silently fabricates zeros or permits NULLs for a
NOT NULLcolumn - both scenarios directly violate the constraint definition. - C is wrong: SYNC does not generically prohibit DDL that adds constraints; the failure is data-driven, not constraint-type-driven.
- E is wrong: the column
SALdoesn't yet exist in APP_PDB1 before SYNC, so "SAL is empty in APP_ROOT" is meaningless - the blocking issue is the existing row data, not a missing column value.
Memory tip: When writing upgrade scripts for Application Containers, treat NOT NULL ADD like a loaded gun - it only fires safely on an empty table. Always pair NOT NULL with a DEFAULT value when existing rows may be present: ADD (sal NUMBER DEFAULT 0 NOT NULL).
Topics
Community Discussion
No community discussion yet for this question.