/****** Object: Table [dbo].[Books] Script Date: 2/2/2000 1:31:09 AM ******/
if exists (select * from sysobjects
                where id = object_id(N'[dbo].[Books]') and
                        OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Books]
GO

CREATE TABLE [dbo].[Books] (
        [AuthorID] [int] NOT NULL ,
        [Category] [smallint] NOT NULL ,
        [Title] [varchar] (255) NOT NULL ,
        [Comments] [varchar] (1000) NULL ,
        [BookID] [int] IDENTITY (1, 1) NOT NULL ,
        [SortOrder] [int] NOT NULL
                CONSTRAINT [DF_Books_SortOrder] DEFAULT (0),
        CONSTRAINT [PK_Books] PRIMARY KEY  NONCLUSTERED 
        (
                [BookID]
        )  ON [PRIMARY] ,
        CONSTRAINT [FK_Books_Authors] FOREIGN KEY 
        (
                [AuthorID]
        ) REFERENCES [dbo].[Authors] (
                [AuthorID]
        ) NOT FOR REPLICATION ,
        CONSTRAINT [FK_Books_Book_Categories] FOREIGN KEY 
        (
                [Category]
        ) REFERENCES [dbo].[Book_Categories] (
                [Category]
        ) NOT FOR REPLICATION 
) ON [PRIMARY]
GO

This page was last updated on May 01, 2006 04:28 PM.