Student(student_id, fname, lname, dob, city, cgpa, deptno)
Course (ccode, cname, noofcredits, deptno)
StudentCourse ( student_id, ccode, grade)
Department (deptno, dname)
Course (ccode, cname, noofcredits, deptno)
StudentCourse ( student_id, ccode, grade)
Department (deptno, dname)
*this colour indicates primary key
Q1: Assume that Student, Course and Department tables are already created. Please create ‘StudentCourse’ table using the following datatypes. Student_id must be number with 6 digits, Ccode must be variable length string (varchar2) with at most 7 characters and Grade must be variable length string with at most 2 characters.
All Primary Key and Foreign Keys must be declared clearly.
Below is how I tried to solve it but it didnt work
Code:
CREATE TABLE studentcourse
(student_id integer(6) NOT NULL
ccode varchar(7) NOT NULL
grade varchar(2));
Q2: Update Student table and change the students’ cgpa from 2.00 to 2.50 whose department name is CMPE
Below is how I tried to solve it but i can't complete it
Code:
UPDATE student SET cgpa=2.50
WHERE cgpa=2.00
AND
Last edited: