像这条语句怎么写?insert into shopingcart(spid,scount,ip,xiaoji) values(@spid,1,@ip,select price from product where pid=@spid)
像这条语句怎么写?insert into shopingcart(spid,scount,ip,xiaoji) values(@spid,1,@ip,select price from product where pid=@spid)立马结 --------------------编程问答-------------------- 什么意思啊 --------------------编程问答-------------------- insert into shopingcart(spid,scount,ip,xiaoji)
select @spid,1,@ip,price from product where pid=@spid
--------------------编程问答-------------------- 樓上正解. --------------------编程问答-------------------- 传参
DECLARE @xiaoji INT;
SELECE @xiaoji = price from product where pid=@spid;
insert into shopingcart(spid,scount,ip,xiaoji) values(@spid,1,@ip,@xiaoji)
补充:.NET技术 , ASP.NET