insert into useraddFunctions(列1,2,3)
select Formtag,buttontag,@varuserid from rolefunctions WHERE rolecode=@varrolecode
select Formtag,buttontag,@varuserid from rolefunctions WHERE rolecode=@varrolecode
select Formtag,buttontag,@varuserid from rolefunctions WHERE rolecode=@varrolecode
用select 得到數據插入時要加上相應的字段名
FOR INSERT
AS
insert into useraddFunctions(Formtag,buttontag,userid) --写对应的字段
select r.Formtag,r.buttontag,i.userid
from rolefunctions r,inserted i
WHERE r.rolecode=i.rolecodego
wutao411(wutao411)
CCEO(CSDN的CEO??)
这样写它实际使用的时候提示:键列信息不足或不正确,更新影响到多行
是什么原因导致的呀?
lxf21(凌波微步)
我就是要在insert aa表的时候提取userid信息,到bb查找对应信息,然后插入到cc表中