精选优质文档-倾情为你奉上一、定义完整性 /*创建表s、p、j、spj*/ 定义s表; sno主码,sname非空、city缺省值 create table S (sno char (10) primary key,sname char(10) not null,city char(10) )定义p表; pno主码,pname非空、color只能取红、蓝、绿 create table P (pno char (10) primary key ,pname char(10) not null ,color char(10)check (color in(red,blue,green)定义j表; jno主码, jname非空 create table j (jno char (10) primary key, jname char(10)not null)定义spj表; (sno,pno,jno)主码,参照sno、pno、jno外码,qty介于0-1000 create table spj(sno char(