当前位置:编程学习 > C#/ASP.NET >>

像这条语句怎么写?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
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,