sqlServer组合主键

sqlServer   组合主键

创建表时:

create table Person
(
Name1 nvarchar(10) not null
,Name2 nvarchar(10) not null
primary key(Name1,Name2)
,Age int not null
,Sex char(2)
)
go
View Code

效果如下图:

表创建后:

 

posted @ 2014-03-13 20:50  土豆哥  阅读(2435)  评论(0编辑  收藏  举报