Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table category (
- catId int identity(1,1),
- catName varchar(20),
- Constraint pk_category
- PRIMARY KEY(catId))
- create table subcategory (
- subCatId INT IDENTITY(1,1),
- catId INT,
- subCatName VARCHAR(20),
- CONSTRAINT pk_subcategory
- PRIMARY KEY(catId,subCatId),
- CONSTRAINT fk_subcat_cat
- FOREIGN KEY(catID)
- REFERENCES category(catId))
Add Comment
Please, Sign In to add comment