我想在表中插入一些已有记录的不同值。我正在使用此命令。
insert into UserPnlCentre(userId,pnlCentreId,createdUser) values(select userId from UserPnlCentre where pnlCentreId!=4,4,'Migration')
这有什么问题?
答案 0 :(得分:0)
试试这个:
insert into UserPnlCentre (
userId
, pnlCentreId
, createdUser
)
select userId
, 4
, 'Migration'
from UserPnlCentre
where pnlCentreId != 4