HELP TABLES;
HELP DESCRIBE STUDENT;
HELP CREATE TABLE;
HELP DROP TABLE;
HELP SELECT;
HELP INSERT;
HELP DELETE;
HELP UPDATE;
SELECT * FROM ENROLLED;
DROP TABLE MANAGER;
DROP TABLE STUDENT;
SELECT snum,sname FROM STUDENT;
SELECT * FROM ENROLLED WHERE student_num=14181;
SELECT sname,cname,fname FROM STUDENT,CLASS,FACULTY,ENROLLED WHERE snum=student_num AND fid=faculty_id AND cname=class_name;
SELECT sname,cname FROM STUDENT,CLASS;
SELECT snum FROM DEPARTMENT;
SELECT snum,deptid FROM DEPARTMENT;
INSERT INTO ENROLLED VALUES(1111,'CS448');
INSERT INTO ENROLLED VALUES(14181,'ENG400');
INSERT INTO ENROLLED VALUES(14181,'CS448');
SELECT * FROM ENROLLED WHERE student_num=14181 OR class_name='CS448' OR student_num=1111;
SELECT fname FROM FACULTY WHERE fid=1111;
UPDATE DEPARTMENT SET location='WLafayette' WHERE deptid=11 OR deptid=22;
UPDATE STUDENT SET age=21,sname='Smith' WHERE sname='A.Smith';
SELECT * FROM CLASS;
UPDATE CLASS SET meets_at='12:00';
SELECT * FROM CLASS;
CREATE TABLE GRADE(stu_num INT, classname CHAR(30), grade CHAR(2), PRIMARY KEY(stu_num, classname), FOREIGN KEY (stu_num) REFERENCES STUDENT(snum), FOREIGN KEY (classname) REFERENCES CLASS(cname));
INSERT INTO GRADE VALUES('ENG400', 14181, 'A');
INSERT INTO GRADE VALUES(14181, 'ENG400', 'A');
INSERT INTO GRADE VALUES(80161,'ENG400', 'B');
CREATE USER user10 User-A;
QUIT;
