nerdexam
Oracle

1Z0-007 · Question #145

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?

The correct answer is D. ALTER TABLE students. This statement provides correct syntax to add a primary key on the STUDENT_ID column of the Incorrect Answers A: This ALTER TABLE statement is missing CONSTRAINT keyword and the name of the B: This ALTER TABLE statement is missing the name of the constraint. C: its incorrect…

Creating and Managing Schema Objects

Question

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?

Options

  • AALTER TABLE students
  • BALTER TABLE students
  • CALTER TABLE students
  • DALTER TABLE students
  • EALTER TABLE students

How the community answered

(41 responses)
  • A
    5% (2)
  • B
    2% (1)
  • C
    7% (3)
  • D
    83% (34)
  • E
    2% (1)

Explanation

This statement provides correct syntax to add a primary key on the STUDENT_ID column of the Incorrect Answers A: This ALTER TABLE statement is missing CONSTRAINT keyword and the name of the B: This ALTER TABLE statement is missing the name of the constraint. C: its incorrect syntax in the ALTER TABLE command: STUDENT_ID must be used with E: We need to add constraint, not to modify existing one. Usage of the MODIFY keyword is incorrect in this case.

Topics

#ALTER TABLE#ADD CONSTRAINT#primary key#table modification

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice