ALTER TABLE stuInfo ADD CONSTRAINT PK_stuNo PRIMARY KEY(strNo) 设置主键
ALTER TABLE stuInfo ADD CONSTRAINT UQ_stuId UNIQUE(strId) 设置唯一约束
ALTER TABLE stuInfo ADD CONSTRAINT DF_address DEFAULT('地址不详') FOR strAddress 设置默认约束
ALTER TABLE stuInfo ADD CONSTRAINT CH_strAge CHECK(strAge BETWEEN 20 AND 40) 设置检查约束
ALTER TABLE strMarks ADD CONSTRAINT FK_stuNo FOREIGN KEY(strNo) REFERENCES stuInfo(strNo) 设置主外键