文档详情

面向对象软件工程与UML 教学课件 作者 张京 数据库的SQL脚本代码.doc

发布:2017-08-17约6.71千字共4页下载文档
文本预览下载声明
PowerDesigner设计的PDM模型生成数据库的SQL脚本(数据库名称为testDB),代码如下 /*==============================================================*/ /* Database name: 流动人口管理系统PDM */ /* DBMS name: Microsoft SQL Server 2000 */ /* Created on: 2008-1-4 10:51:46 */ /*==============================================================*/ if exists (select * from odb.sysdatabases where name=TestDB) drop database TestDB go create database TestDB go use TestDB go if exists (select 1 from sysindexes where id = object_id(TenancyBargin) and name = HouseHost_Contract_FK and indid 0 and indid 255) drop index TenancyBargin.HouseHost_Contract_FK go if exists (select 1 from sysindexes where id = object_id(TenancyBargin) and name = Person_Contract_FK and indid 0 and indid 255) drop index TenancyBargin.Person_Contract_FK go if exists (select 1 from sysindexes where id = object_id(TenancyHouse) and name = C_Tenancy_FK and indid 0 and indid 255) drop index TenancyHouse.C_Tenancy_FK go if exists (select 1 from sysobjects where id = object_id(HouseHost) and type = U) drop table HouseHost go if exists (select 1 from sysobjects where id = object_id(PerMsg) and type = U) drop table PerMsg go if exists (select 1 from sysobjects where id = object_id(TenancyBargin) and type = U) drop table TenancyBargin go if exists (select 1 from sysobjects
显示全部
相似文档