/****** Object: Database NorthwindSample Script Date: 1/05/2002 12:48:54 PM ******/ IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'NorthwindSample') DROP DATABASE [NorthwindSample] GO CREATE DATABASE [NorthwindSample] ON (NAME = N'NorthwindSample_dat', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\NorthwindSample.mdf' , SIZE = 3, FILEGROWTH = 10%) LOG ON (NAME = N'NorthwindSample_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\NorthwindSample.ldf' , SIZE = 2, FILEGROWTH = 10%) GO exec sp_dboption N'NorthwindSample', N'autoclose', N'false' GO exec sp_dboption N'NorthwindSample', N'bulkcopy', N'true' GO exec sp_dboption N'NorthwindSample', N'trunc. log', N'true' GO exec sp_dboption N'NorthwindSample', N'torn page detection', N'true' GO exec sp_dboption N'NorthwindSample', N'read only', N'false' GO exec sp_dboption N'NorthwindSample', N'dbo use', N'false' GO exec sp_dboption N'NorthwindSample', N'single', N'false' GO exec sp_dboption N'NorthwindSample', N'autoshrink', N'false' GO exec sp_dboption N'NorthwindSample', N'ANSI null default', N'false' GO exec sp_dboption N'NorthwindSample', N'recursive triggers', N'false' GO exec sp_dboption N'NorthwindSample', N'ANSI nulls', N'false' GO exec sp_dboption N'NorthwindSample', N'concat null yields null', N'false' GO exec sp_dboption N'NorthwindSample', N'cursor close on commit', N'false' GO exec sp_dboption N'NorthwindSample', N'default to local cursor', N'false' GO exec sp_dboption N'NorthwindSample', N'quoted identifier', N'false' GO exec sp_dboption N'NorthwindSample', N'ANSI warnings', N'false' GO exec sp_dboption N'NorthwindSample', N'auto create statistics', N'true' GO exec sp_dboption N'NorthwindSample', N'auto update statistics', N'true' GO use [NorthwindSample] /****** Object: Table [dbo].[Categories] Script Date: 1/05/2002 12:48:55 PM ******/ if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Categories]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[Categories] GO /****** Object: User dbo Script Date: 1/05/2002 12:48:54 PM ******/ /****** Object: Table [dbo].[Categories] Script Date: 1/05/2002 12:49:06 PM ******/ CREATE TABLE [dbo].[Categories] ( [CategoryID] [int] IDENTITY (1, 1) NOT NULL , [CategoryName] [nvarchar] (15) COLLATE Latin1_General_CI_AS NOT NULL , [Description] [ntext] COLLATE Latin1_General_CI_AS NULL , [Picture] [image] NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO USE [NorthwindSample] SET NOCOUNT ON PRINT 'Deleting from table: Categories' DELETE FROM [dbo].[Categories] GO /* Insert scripts for table: [Categories] */ PRINT 'Inserting rows into table: [Categories]' SET IDENTITY_INSERT dbo.[Categories] ON /* Warning - IMAGE datatype not supported for Insert scripts */ INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (2, 'Beverages', 'Soft drinks, coffees, teas, beers, and ales', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (1, 'Condiments', 'Sweet and savory sauces, relishes, spreads, and seasonings', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (3, 'Confections', 'Desserts, candies, and sweet breads', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (6, 'Dairy Products', 'Cheeses', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (10, 'Fruit', 'Bananas, Oranges and Apples', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (5, 'Grains/Cereals', 'Breads, crackers, pasta, and cereal', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (4, 'Meat/Poultry', 'Prepared meats', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (11, 'Pasta', 'Spaghetti, Ravioli and Macaroni', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (7, 'Produce', 'Dried fruit and bean curd', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (8, 'Seafood', 'Seaweed and fish', NULL) GO INSERT INTO dbo.[Categories] ([CategoryID], [CategoryName], [Description], [Picture]) VALUES (9, 'Vegetables', 'Carrots, Pumpkin and Spinach', NULL) GO SET IDENTITY_INSERT dbo.[Categories] OFF ALTER TABLE [dbo].[Categories] WITH NOCHECK ADD CONSTRAINT [PK_Categories] PRIMARY KEY CLUSTERED ( [CategoryID] ) ON [PRIMARY] GO CREATE INDEX [CategoryName] ON [dbo].[Categories]([CategoryName]) ON [PRIMARY] GO GRANT REFERENCES , SELECT , UPDATE , INSERT , DELETE ON [dbo].[Categories] TO [public] GO GRANT REFERENCES , SELECT , UPDATE , INSERT , DELETE ON [dbo].[Orders] TO [public] GO GRANT REFERENCES , SELECT , UPDATE , INSERT , DELETE ON [dbo].[Products] TO [public] GO GRANT REFERENCES , SELECT , UPDATE , INSERT , DELETE ON [dbo].[Region] TO [public] GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO