-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateEmployeeTable
36 lines (29 loc) · 1.03 KB
/
CreateEmployeeTable
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
USE [Face_AttendanceDB]
GO
/****** Object: Table [dbo].[EmployeeTable] Script Date: 2019/5/23 星期四 20:17:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EmployeeTable](
[Eid] [int] NOT NULL,
[Ename] [nchar](10) NOT NULL,
[Esex] [bit] NOT NULL,
[Ebirthday] [date] NOT NULL,
[EattendanceTimes] [int] NULL,
[ElastSignTime] [datetime] NULL,
[EdepartId] [int] NOT NULL,
[ElateTimes] [int] NULL,
[EearlyTimes] [int] NULL,
CONSTRAINT [PK_EmployeeTable] PRIMARY KEY CLUSTERED
(
[Eid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EmployeeTable] ADD CONSTRAINT [DF_EmployeeTable_attendanceTimes] DEFAULT ((0)) FOR [EattendanceTimes]
GO
ALTER TABLE [dbo].[EmployeeTable] ADD CONSTRAINT [DF_EmployeeTable_ElateTimes] DEFAULT ((0)) FOR [ElateTimes]
GO
ALTER TABLE [dbo].[EmployeeTable] ADD CONSTRAINT [DF_EmployeeTable_EearlyTimes] DEFAULT ((0)) FOR [EearlyTimes]
GO