if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CRM_LimitTemplet]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CRM_LimitTemplet]
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CRM_LimitTemplet]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[CRM_LimitTemplet] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Name] [varchar] (40) NOT NULL ,
[Limit] [varchar] (500) NOT NULL ,
[IsDefault] [bit] NOT NULL ,
[CanViewEmpStyleID] [varchar] (200) NOT NULL ,
[Department2] [varchar] (30) NULL ,
[Department3] [varchar] (30) NULL
) ON [PRIMARY]
END
GO
ALTER TABLE [dbo].[CRM_LimitTemplet] WITH NOCHECK ADD
CONSTRAINT [DF__CRM_LimitT__Name__6501FCD8] DEFAULT ('') FOR [Name],
CONSTRAINT [DF__CRM_Limit__Limit__65F62111] DEFAULT ('') FOR [Limit],
CONSTRAINT [DF__CRM_Limit__IsDef__66EA454A] DEFAULT (0) FOR [IsDefault],
CONSTRAINT [DF__CRM_Limit__CanVi__25918339] DEFAULT ('') FOR [CanViewEmpStyleID]
GO
用于记录权限