SQL
USE PrintMonitor
GO
/****** Object:  Table [[dbo]].[[Categorised Documents]]    Script Date: 10/15/2008 19:57:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Categorised Documents](
	[Category Type] [varchar](25) NOT NULL,
	[Category Name] [varchar](50) NOT NULL,
	[Printer Id] [numeric](18, 0) NOT NULL,
	[Printer Reboot Count] [int] NOT NULL CONSTRAINT [DF_Categorised Documents_Printer Reboot Cound]  DEFAULT ((0)),
	[Job Id] [int] NOT NULL,
	[Submitted] [datetime] NOT NULL,
 CONSTRAINT [PK_Categorised Documents] PRIMARY KEY CLUSTERED 
(
	[Category Type] ASC,
	[Category Name] ASC,
	[Printer Id] ASC,
	[Printer Reboot Count] ASC,
	[Job Id] ASC,
	[Submitted] 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].[Categorised Documents]  WITH CHECK ADD  CONSTRAINT [FK_Categorised Documents_Document Categories] FOREIGN KEY([Category Type], [Category Name])
REFERENCES [dbo].[Document Categories] ([Category Type], [Category Name])
GO
ALTER TABLE [dbo].[Categorised Documents] CHECK CONSTRAINT [FK_Categorised Documents_Document Categories]
GO

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

Comments

No comments yet.