正在加载图片...
《数据库规划与设计》实验指导/实验六物理数据模型的创建及管理 where r. fkeyid=object id(C PROJECT)and o. name =FK C PROJEC IS RESPON C EMPLOY) alter table C Project drop constraint FK_C_PROJEC_IS_ RESPON_C_ EMPLOY if exists(select 1 from dbo. sysreferences r join dbo. sysobjects o on(o id =r consti and o type =F where r. fkeyid =object id(C_ USED) and o name=FKC USED USED C EMPLOY ter table C USED drop constraint FK_C_USED_ USED_C_ EMPLOY if exists(select I from sysing where id =object id(C EMPLOyee nd name =BELONGS TO FK and indid >0 and indid <255) drop index C EMPLOYEE BELONGS TO FK if exists(select 1 from sysindexes where id =object id(C EMPLOYEE) name =CHIEF FK indid>0 and indid <255) drop index C EMPLOYEE. CHIEF FK if exists(select 1 from sysobjects here id =object id(C EMPLOYEE drop table C EMPLOYEE A Table: C EMPLOYEE create table C EMPLOYEE( EMPNUM not null C E EMPNUM ID 管理科学与工程学科/共8页第5页《数据库规划与设计》实验指导 /实验六 物理数据模型的创建及管理 5 管理科学与工程学科 / 共 8 页,第 5 页 where r.fkeyid = object_id('C_PROJECT') and o.name = 'FK_C_PROJEC_IS_RESPON_C_EMPLOY') alter table C_PROJECT drop constraint FK_C_PROJEC_IS_RESPON_C_EMPLOY go /* */ if exists (select 1 from dbo.sysreferences r join dbo.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('C_USED') and o.name = 'FK_C_USED_USED_C_EMPLOY') alter table C_USED drop constraint FK_C_USED_USED_C_EMPLOY go /* */ if exists (select 1 from sysindexes where id = object_id('C_EMPLOYEE') and name = 'BELONGS_TO_FK' and indid > 0 and indid < 255) drop index C_EMPLOYEE.BELONGS_TO_FK go /* */ if exists (select 1 from sysindexes where id = object_id('C_EMPLOYEE') and name = 'CHIEF_FK' and indid > 0 and indid < 255) drop index C_EMPLOYEE.CHIEF_FK go if exists (select 1 from sysobjects where id = object_id('C_EMPLOYEE') and type = 'U') drop table C_EMPLOYEE go /* */ /*==============================================================*/ /* Table: C_EMPLOYEE */ /*==============================================================*/ create table C_EMPLOYEE ( EMPNUM ID not null, C_E_EMPNUM ID null
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有