QuestionQ10

VerifiedCreating and Managing Tables

Which statement adds a column named salary to the employees table, which has 100 rows, so that it cannot contain NULL values?

Question Image

Explanation

Oracle Database cannot add a NOT NULL column to a table that already has rows unless the statement also specifies a DEFAULT value. A DEFAULT 0 supplies a non-null value for the existing rows, while NOT NULL prevents null values going forward. Oracle Database SQL Language Reference: ALTER TABLE

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!