Question: You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.
Which of the following statements will accomplish this task?
A
ALTER TABLE students ADD PRIMARY KEY student_id;
B
ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
C
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
D
ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
E
ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
Question: The STUDENT_GRADES table has these columns:
STUDENT_ID NUMBER (12)
SEMESTER_END DATE
GPA NUMBER (4, 3)
Which of the following statements finds the highest Grade Point Average (GPA) per semester?
A
SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL;
B
SELECT (gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;
C
SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY semester_end;
D
SELECT MAX(gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM student_grades;
E
SELECT MAX(gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;