This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / 用select返回一条记录, 如果把field保存到几个变量里面? 必须要用cursor吗?
-tonyhao(tonyhao);
2008-12-16
(#4924296@0)
-
for example, select a = count(*), b=sum(amount) from table1 where id>1000
-googlebot(bot);
2008-12-16
(#4924298@0)
-
Syntax error. You missed @
-deep_blue(BLUE);
2008-12-16
(#4924319@0)
-
if only one record returned, you can try:
select @a=fieldA,@b=fieldB from table1 where 'whatever'='whatever'
-whereismyid(到处找ID);
2008-12-16
(#4924522@0)
-
好像放到store procedure里面就不好使了.
-tonyhao(tonyhao);
2008-12-20
(#4936133@0)
-
Did you declare those variables (or pass them as parameters) in the SP?
-deep_blue(BLUE);
2008-12-22
(#4939514@0)