AND 100% CORRECT ANSWERS| WELL-
STRUCTURED REVISION PAPER|
VERIFIED BY EXPERT| 2025 NEW
UPDATE.
Table name is student. 2) gwid is a 8-character string (e.g., 26439582). 3) fname, lname, and
email are all of string type, the maximum length allowed is 100. 4) Only two values are allowed
in type: 'undergraduate', 'graduate'. 5) Values in dbyears are integers. 6) ALL cells are NOT
NULL. - ANSWER ✔✔ CREATE TABLE student (gwid CHAR(8) NOT NULL, fname
VARCHAR(100) NOT NULL, lname VARCHAR(100) NOT NULL, type
ENUM('undergraduate', 'graduate') NOT NULL, dbyears INT NOT NULL, email
VARCHAR(100) NOT NULL
);
Update Ted's email address to '' - ANSWER ✔✔ UPDATE student SET
email='' WHERE fname='Ted';
Insert a new row of data: stuid=4, fname=Mark, lname=Johnson, type=undergrad, and email=
- ANSWER ✔✔ INSERT INTO student(stuid, fname, lname, type, email)
VALUES (4,'Mark','Johnson','undergrad', '');
Delete the rows of type "grad" from the table. - ANSWER ✔✔ DELETE FROM student
WHERE type='grad';
Modify the datatype of dbyears to DOUBLE - ANSWER ✔✔ ALTER TABLE student
MODIFY dbyears DOUBLE;
Add a new column signindate into the existing table. signindate is of the format 'YYYY-MM-
DD'. - ANSWER ✔✔ ALTER TABLE student ADD singindate DATE;
Display all information of sessions done by tutor 1006. Show all the columns. Sort the results by
sessiondate in ascending order. For the results having the same sessiondate, further sort them by
studentid in ascending order. - ANSWER ✔✔ SELECT * FROM tutoringsession WHERE
tutorid=1006 ORDER BY sessiondate, studentid;
Display all information about accounting sessions (i.e., sessions with courseid ACCYxxxx). -
ANSWER ✔✔ SELECT * FROM tutoringsession WHERE courseid LIKE "ACCY%";