Multiple choice

Which of the following is TRUE about PRIMARY KEY Constraint

  1. A Table can have more than one primary key.
  2. PRIMARY KEY should be defined along with the creation of the Table.
  3. PRIMARY KEY can be added after creating the Table using ALTER .
  4. PRIMARY KEY can also be dropped in case it is not useful.
  5. To define a PRIMARY KEY on any column, the column should ensure not to contain any NULL values.

  1. 1, 2, 4 are correct

  2. 1, 3 and 5 are correct

  3. 3, 4 and 5 are correct

  4. 2, 3 and 4 are correct

  5. All are correct

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation
  1. No, A Table can have only one primary key.
    1. No, It is not mandatory. It is one of the ways to define a PRIMARY KEY.
    2. Yes, PRIMARY KEY can be added after creating the Table using ALTER .
    3. Yes, using ALTER statement.
    4. Yes, can use NOT NULL constraint.