我如何通过存储过程在变量中存储比值更多的值 [英] How can i store more than i value in a variable through stored procedure
本文介绍了我如何通过存储过程在变量中存储比值更多的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
先生,我想知道如何在一个变量中存储多个值,就像我声明一个变量@a varchar(500)
,现在我想在其中存储多个值,即从Image中选择ImageName
Sir, i want to know how can i store more than one value in a variable like i am declaring a variable @a varchar(500)
now i wanna store more than one value in this i.e select ImageName from Image
select @a=ImageName from Image
print @a
我认为 u 您了解. Plz 请给出正确的解决方案.
I think u you understand. Plz Please give a right solution.
推荐答案
好的,我已经做到了.像这样
Okay i have done it. like this
declare @out varchar(1000)
set @out=''
select @out=@out+ImageUrl+' ' from PicSet where PicSetName='PICSET2' and CategoryID=2 and level='Ll'
print @out
这篇关于我如何通过存储过程在变量中存储比值更多的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文