Difficulty: Easy
Correct Answer: You cannot increase or decrease the number of decimal places.
Explanation:
Introduction:
Managing schema evolution safely is a core DBA task. Oracle permits many column alterations online, but each has rules and caveats. This question asks you to identify the statement that is not true about modifying columns, focusing on precision/scale and safe changes.
Given Data / Assumptions:
Concept / Approach:
Oracle allows increasing column lengths for character types and increasing precision for numeric types because these changes do not risk truncation. For numeric columns, you can also change scale (decimal places). Increasing scale is generally permitted; decreasing scale may be blocked if existing data would be rounded or truncated beyond allowed rules. Therefore, the categorical statement “You cannot increase or decrease the number of decimal places” is not true. The accurate rule is “you can change scale subject to data compatibility.”
Step-by-Step Solution:
1) Evaluate each claim against Oracle ALTER TABLE rules.2) Recognize that increasing lengths/precision is usually safe; reducing may fail over existing data.3) Note that scale changes (decimal places) are allowed with constraints, so a blanket “cannot” is false.4) Choose the NOT true statement: option (d).
Verification / Alternative check:
Oracle SQL Language Reference documents MODIFY ... column changes, including permitted adjustments to precision and scale with data checks.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting to assess existing data before decreasing sizes or scale; always verify with SELECT checks before ALTER TABLE.
Final Answer:
You cannot increase or decrease the number of decimal places.
Discussion & Comments