if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK__DepartmentInform__20C1E124]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[DepartmentInformation] DROP CONSTRAINT FK__DepartmentInform__20C1E124
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK__EmployeeI__E_Nam__21B6055D]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[EmployeeInformation] DROP CONSTRAINT FK__EmployeeI__E_Nam__21B6055D
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK__EmployeeI__E_Nam__22AA2996]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[EmployeeInformation] DROP CONSTRAINT FK__EmployeeI__E_Nam__22AA2996
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK__EmployeeI__E_Nam__239E4DCF]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[EmployeeInformation] DROP CONSTRAINT FK__EmployeeI__E_Nam__239E4DCF
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK__EmployeeI__E_Nam__24927208]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[EmployeeInformation] DROP CONSTRAINT FK__EmployeeI__E_Nam__24927208
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DepartmentInformation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[DepartmentInformation]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[EmployeeInformation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[EmployeeInformation]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[EncouragementPunishInformation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[EncouragementPunishInformation]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TrainInformation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[TrainInformation]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UserInformation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[UserInformation]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WageInformation]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[WageInformation]
GO
CREATE TABLE [dbo].[DepartmentInformation] (
[E_Number] [int] IDENTITY (1, 1) NOT NULL ,
[E_Department] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[D_Count] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[EmployeeInformation] (
[E_Number] [int] IDENTITY (1, 1) NOT NULL ,
[E_Name] [varchar] (30) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_Sex] [varchar] (2) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_BornDate] [varchar] (30) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_Marriage] [varchar] (4) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_PoliticsVisage] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_SchoolAge] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_EnterDate] [varchar] (30) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_InDueFormDate] [varchar] (30) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_Department] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_Headship] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_Estate] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[E_Remark] [varchar] (500) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[EncouragementPunishInformation] (
[EP_Number] [int] IDENTITY (1, 1) NOT NULL ,
[E_Name] [varchar] (30) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[EP_Date] [varchar] (30) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[EP_Address] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[EP_Causation] [varchar] (200) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[EP_Remark] [varchar] (500) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[TrainInformation] (
[T_Number] [varchar�
- 1
- 2
前往页