Sep 29 2009

Sqlserver tables

tblCategory Table copy below category table and paste it in SqlServer

CREATE TABLE  tblCategory(
CategoryID  int  IDENTITY(1,1) NOT NULL,
CategoryName varchar(50)NOT NULL,
CategoryDesc varchar(255)NULL,
PostedDate datetime NULL CONSTRAINT [DF_tblCategory_PostedDate]  DEFAULT (getdate()),
CONSTRAINT [PK_tblCategory] PRIMARY KEY CLUSTERED
(
[CategoryID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

Insert Data

categoryData

categoryData

tblSubCategory Table

CREATE TABLE [dbo].[tblSubCategory](

[SubCategoryID] [int] IDENTITY(1,1) NOT NULL,
[CategoryID] [int] NOT NULL,
[SubCategory] [varchar](50) NOT NULL,
[SubCategoryDesc] [varchar](255) Not NULL,
CONSTRAINT [PK_tblSubCategory] PRIMARY KEY CLUSTERED
(
[SubCategoryID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

subcategoryData

subcategoryData

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Leave a Reply

Alibi3col theme by Themocracy