SqlServer 将表里面的值赋给变量

@@c_beiz varchar(500)

select top 1 @c_beiz = c_beiz from g_billd_qh_tmp where u_id=''+@uid+'' and iodate=''+@iodate+'' 

and gfrom=''+@gfrom+'' and gto=''+@gto+'' and c_zaiy=''+@c_zaiy+''

原文地址:https://www.cnblogs.com/linjincheng/p/11352096.html