【正文】
drop constraint FK_教材發(fā)放 _教材發(fā)放 _STUDENTM go 14 if exists (select 1 from r join o on ( = and = 39。) where = object_id(39。) and = 39。) alter table 教材發(fā)放 drop constraint FK_教材發(fā)放 _教材發(fā)放 2_SBMANAGE go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index go if exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table Classmangement go if exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table Courseinformationform go if exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table Departmentform go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index 15 go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index go if exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table GradeManagement go if exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table SBMANAGE go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index go if exists (select 1 16 from sysobjects where id = object_id(39。) and type = 39。) drop table TeachManage go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index go if exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table TeacherManage go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index go if exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) 17 drop table studentmanage go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index 教材使用 .教材使用 2_FK go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index 教材使用 .教材使用 _FK go if exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table 教材使用 go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index 教材發(fā)放 .教材發(fā)放 2_FK go if exists (select 1 from sysindexes where id = object_id(39。) and name = 39。 and indid 0 and indid 255) drop index 教材發(fā)放 .教材發(fā)放 _FK 18 go if exists (select 1 from sysobjects where id = object_id(39。) and type = 39。) drop table 教材發(fā)放 go alter table Classmangement add constraint FK_CLASSMAN_RELATIONS_DEPARTME foreign key (Depar_Id) references Departmentform (Depar_Id) go alter table GradeManagement add constraint FK_GRADEMAN_RELATIONS_STUDENTM foreign key (St_Id) references studentmanage (St_Id) go alter table GradeManagement add constraint FK_GRADEMAN_RELATIONS_COURSEIN foreign key (Course_Id) references Courseinformationform (Course_Id) go alter table TeachManage add constraint FK_TEACHMAN_RELATIONS_COURSEIN foreign key (Course_Id) references Courseinformationfo