34,874
社区成员
发帖
与我相关
我的任务
分享
insert into days
select
productID = (select productID from product where product_name = @pName)
,recordID = (select recordID from record where record_name = @rName)
,peopleID = (select peopleID from EMP where name = @ename)
,plan = @plan
错误已经提示的很明显了。列名数目不匹配,改为如下。
insert into days(productid,recordid,propleid,plan)
select
productID = (select productID from product where product_name = @pName)
,recordID = (select recordID from record where record_name = @rName)
,peopleID = (select peopleID from EMP where name = @ename)
,plan = @plan