SQL语句、EF DataAnnotation和EF Fluent API方式建立联合主键

SQL语句,先建立一张没有主键的表html create table tb_test1 ( id1 int not null, id2 int not null, [name] nvarchar(10) ) -- 传入的两列不能是主键,否则报错,说该表已经存在主键 alter table tb_test1 add constraint pk_id2 primary key(id1,id2) Da
相关文章
相关标签/搜索