⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crebas.sql

📁 地址档案管理系统
💻 SQL
字号:
/*==============================================================*/
/* Database name:  PhysicalDataModel_1                          */
/* DBMS name:      Microsoft SQL Server 2000                    */
/* Created on:     2004-8-17 18:23:10                           */
/*==============================================================*/


alter table detail_code
   drop constraint FK_DETAIL_C_REFERENCE_MASTER_C
go


if exists (select 1
            from  sysobjects
           where  id = object_id('detail_code')
            and   type = 'U')
   drop table detail_code
go


if exists (select 1
            from  sysobjects
           where  id = object_id('master_code')
            and   type = 'U')
   drop table master_code
go


/*==============================================================*/
/* Table: detail_code                                           */
/*==============================================================*/
create table detail_code (
   master_code          nvarchar(20)         not null,
   detail_code          nvarchar(50)         not null,
   caption              nvarchar(50)         not null,
   note                 nvarchar(50)         null,
   constraint PK_DETAIL_CODE primary key  (master_code, detail_code)
)
go


/*==============================================================*/
/* Table: master_code                                           */
/*==============================================================*/
create table master_code (
   code                 nvarchar(20)         not null,
   caption              nvarchar(50)         not null,
   note                 nvarchar(50)         null,
   constraint PK_MASTER_CODE primary key  (code)
)
go


alter table detail_code
   add constraint FK_DETAIL_C_REFERENCE_MASTER_C foreign key (master_code)
      references master_code (code)
go


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -