SQL :
USE PrintMonitor
GO
/****** Object:  Table dbo.Automatic Document Categorisation    Script Date: 10/14/2008 22:31:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Automatic Document Categorisation](
	[Category Type] [varchar](25) NOT NULL,
	[Category Name] [varchar](50) NOT NULL,
	[Document Field Name] [varchar](50) NOT NULL,
	[Restriction Type] [char](10) NOT NULL CONSTRAINT [DF_Automatic Document Categorisation_Restriction Type]  DEFAULT ('Equals'),
	[Restriction Value] [varchar](200) NOT NULL,
 CONSTRAINT [PK_Automatic Document Categorisation] PRIMARY KEY CLUSTERED 
(
	[Category Type] ASC,
	[Category Name] ASC,
	[Document Field Name] 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
SET ANSI_PADDING ON
GO
ALTER TABLE [dbo].[Automatic Document Categorisation]  WITH CHECK ADD  CONSTRAINT [FK_Automatic Document Categorisation_Document Categories] FOREIGN KEY([Category Type], [Category Name])
REFERENCES [dbo].[Document Categories] ([Category Type], [Category Name])
GO
ALTER TABLE [dbo].[Automatic Document Categorisation] CHECK CONSTRAINT [FK_Automatic Document Categorisation_Document Categories]
go

Last edited Oct 15, 2008 at 7:03 PM by Merrion, version 2

Comments

No comments yet.