Create a Table using script

Create Table ProductTable
(
   Id Int Not Null Identity(1,1),
   Name Varchar(50) Null, 
   CategoryId Int Null,  
   CategoryId2 Int Null,
   CreatedTime DateTime Null Default(Getdate()),   
   Primary Key Clustered(Id Asc),
   Unique Nonclustered(Name Asc),   
   Foreign Key (CategoryId) References Category(Id),
   Foreign Key (CategoryId2) References Category(Id)
)

 

posted on 2013-02-27 14:32  shcity  阅读(130)  评论(0)    收藏  举报

导航