-
Notifications
You must be signed in to change notification settings - Fork 0
/
0008 OPS_T_Category.sql
38 lines (29 loc) · 1.05 KB
/
0008 OPS_T_Category.sql
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
36
37
38
USE [KG-IMS]
GO
/****** Object: Table [dbo].[OPS_T_Category] Script Date: 30/03/2014 8:01:41 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OPS_T_Category](
[CategoryGUID] [uniqueidentifier] NOT NULL,
[EquipTypeGUID] [uniqueidentifier] NULL,
[Category] [nvarchar](50) NULL,
[Description] [nvarchar](50) NULL,
[ChangedBy] [nvarchar](50) NOT NULL,
[ChangedOn] [datetime] NOT NULL,
CONSTRAINT [aaaaaOPS_T_Category_PK] PRIMARY KEY NONCLUSTERED
(
[CategoryGUID] 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].[OPS_T_Category] WITH CHECK ADD CONSTRAINT [OPS_T_Category_FK00] FOREIGN KEY([EquipTypeGUID])
REFERENCES [dbo].[OPS_T_EquipTypes] ([EquipTypeGUID])
GO
ALTER TABLE [dbo].[OPS_T_Category] CHECK CONSTRAINT [OPS_T_Category_FK00]
GO
ALTER TABLE [dbo].[OPS_T_Category] ADD DEFAULT (newid()) FOR [CategoryGUID]
GO
ALTER TABLE [dbo].[OPS_T_Category] ADD DEFAULT (GETDATE()) FOR [ChangedOn]
GO