Oracle
1Z0-061 · Question #232
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 ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id). ALTER TABLE table_name ADD [CONSTRAINT constraint] type (coloumn);
Using DDL Statements to Create and Manage Tables
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 ADD PRIMARY KEY student_id;
- BALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
- CALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
- DALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
- EALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
How the community answered
(34 responses)- A3% (1)
- B12% (4)
- C6% (2)
- D79% (27)
Explanation
ALTER TABLE table_name ADD [CONSTRAINT constraint] type (coloumn);
Topics
#ALTER TABLE#ADD CONSTRAINT#PRIMARY KEY#DDL syntax
Community Discussion
No community discussion yet for this question.