开发者

How to collect value returned by select statement in sybase if select returns multiple row of value?

I have a query say "select name from books_det" ,and this query returns say 10 rows(name) , now i want to access the value of each and every row(i.e name) . How will i accomplish this in sybase?

I have tried declare @var varchar select @var=name from books_det //but this r开发者_运维知识库eturns 10 rows i.e 10 name print @var go

This query doesn't seems to give any result. Can anyone please help ?


It seems that you need a cursor.

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sqlug/html/sqlug/sqlug768.htm

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜