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

📄 szxy5.0.sql

📁 实习的时候做的数字校园系统
💻 SQL
📖 第 1 页 / 共 2 页
字号:
/*==============================================================*/
/* Database name:  T&S                                          */
/* DBMS name:      Microsoft SQL Server 2000                    */
/* Created on:     2008-10-22 15:13:37                          */
/*==============================================================*/


alter table StudentInformation
   drop constraint FK_STUDENTI_RELATIONS_STUDENT
go


alter table kaocang
   drop constraint FK_KAOCANG_RELATIONS_EXAM
go


alter table kaocang
   drop constraint FK_KAOCANG_RELATIONS_CLASSROO
go


alter table "plan"
   drop constraint FK_PLAN_RELATIONS_TEACHER
go


alter table score
   drop constraint FK_SCORE_RELATIONS_KC
go


alter table score
   drop constraint FK_SCORE_RELATIONS_STUDENT
go


alter table student
   drop constraint FK_STUDENT_RELATIONS_NEWSTUDE
go


alter table teacherbz
   drop constraint FK_TEACHERB_RELATIONS_TEACHER
go


alter table teacherbz
   drop constraint FK_TEACHERB_RELATIONS_BM
go


alter table teachertest
   drop constraint FK_TEACHERT_RELATIONS_TEACHER
go


alter table xjbdqk
   drop constraint FK_XJBDQK_RELATIONS_STUDENT
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('StudentInformation')
            and   name  = 'Relationship_20_FK'
            and   indid > 0
            and   indid < 255)
   drop index StudentInformation.Relationship_20_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('kaocang')
            and   name  = 'Relationship_15_FK'
            and   indid > 0
            and   indid < 255)
   drop index kaocang.Relationship_15_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('kaocang')
            and   name  = 'Relationship_16_FK'
            and   indid > 0
            and   indid < 255)
   drop index kaocang.Relationship_16_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('"plan"')
            and   name  = 'Relationship_19_FK'
            and   indid > 0
            and   indid < 255)
   drop index "plan".Relationship_19_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('score')
            and   name  = 'Relationship_1_FK'
            and   indid > 0
            and   indid < 255)
   drop index score.Relationship_1_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('score')
            and   name  = 'Relationship_2_FK'
            and   indid > 0
            and   indid < 255)
   drop index score.Relationship_2_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('student')
            and   name  = 'Relationship_13_FK'
            and   indid > 0
            and   indid < 255)
   drop index student.Relationship_13_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('teacherbz')
            and   name  = 'Relationship_17_FK'
            and   indid > 0
            and   indid < 255)
   drop index teacherbz.Relationship_17_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('teacherbz')
            and   name  = 'Relationship_18_FK'
            and   indid > 0
            and   indid < 255)
   drop index teacherbz.Relationship_18_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('teachertest')
            and   name  = 'Relationship_8_FK'
            and   indid > 0
            and   indid < 255)
   drop index teachertest.Relationship_8_FK
go


if exists (select 1
            from  sysindexes
           where  id    = object_id('xjbdqk')
            and   name  = 'Relationship_21_FK'
            and   indid > 0
            and   indid < 255)
   drop index xjbdqk.Relationship_21_FK
go


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


/*==============================================================*/
/* Table: Classroom                                             */
/*==============================================================*/
create table Classroom (
   "cr_NO."             varchar(5)           not null,
   cr_type              varchar(20)          null,
   cr_zws               int                  null,
   ssjxl                varchar(5)           null,
   jskcb                varchar(100)         null,
   sfk                  bit                  null,
   constraint PK_CLASSROOM primary key  ("cr_NO.")
)
go


/*==============================================================*/
/* Table: StudentInformation                                    */
/*==============================================================*/
create table StudentInformation (
   s_id                 int                  not null,
   bnbh                 int                  null,
   zhinfo               text                 null,
   xjk                  varchar(100)         null,
   bynj                 varchar(20)          null
)
go


/*==============================================================*/
/* Index: Relationship_20_FK                                    */
/*==============================================================*/
create   index Relationship_20_FK on StudentInformation (
s_id
)
go


/*==============================================================*/
/* Table: bm                                                    */
/*==============================================================*/
create table bm (
   bmh                  varchar(20)          not null,
   bmm                  varchar(20)          null,
   constraint PK_BM primary key  (bmh)
)
go


/*==============================================================*/
/* Table: exam                                                  */
/*==============================================================*/

⌨️ 快捷键说明

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