不会把 create table tb (voteID int,voteDetailsID int,primary key(voteID,voteDetailsID))insert into tb values(1,1) insert into tb values(1,2)(所影响的行数为 1 行) (所影响的行数为 1 行)
create table test(voteID int,voteDetailsID int,primary key(voteID,voteDetailsID)) go insert into test select 1,1 union select 1,2 go select * from test go drop table test go --结果 /* (2 行受影响) voteID voteDetailsID ----------- ------------- 1 1 1 2(2 行受影响)*/
create table tb
(voteID int,voteDetailsID int,primary key(voteID,voteDetailsID))insert into tb
values(1,1)
insert into tb
values(1,2)(所影响的行数为 1 行)
(所影响的行数为 1 行)
go
insert into test select 1,1 union select 1,2
go
select * from test
go
drop table test
go
--结果
/*
(2 行受影响)
voteID voteDetailsID
----------- -------------
1 1
1 2(2 行受影响)*/