create table Student
(Sno Char(7) not null unique,
Sname VarChar(20) Not Null,
Ssex Char(2) Not Null,
Sage Smallint,
Clno Char(5) Not Null);
create table Course
(Cno char(1) not null unique,
Cname VarChar(20) Not Null,
Credit Smallint);
create table Class
(Clno Char(5) not null unique,
Speciality VarChar(20) Not Null,
Inyear Char(4) Not Null,
Number Integer,
Monitor Char(7));
create table Grade
(Sno Char(7) Not Null,
Cno Char(1) Not Null,
Gmark Numeric(4,1));
Select *from Student;
Select *from Course;
Select *from Grade;
Select *from Class;
alter table Student add nation varchar(20);
alter table Student drop column nation;
INSERT INTO Grade (Sno,Cno,Gmark) VALUES('2001110','3',80);
UPDATE Grade SET Gmark = 70 WHERE Sno = '2001110';
DELETE FROM Grade WHERE Sno = '2001110';
CREATE INDEX IX_Class ON Student(Clno,Sno DESC);
DROP INDEX IX_Class ON Student;