本文介绍了从表中选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有一种方法可以从表中选择值到X中,以便X可以保存多个值,以便用这些值更新另一个表,我正在做的是:
从acct中将数字选择为@number;
(此查询返回多个数字)
并显示此错误(这是预期的)"ERROR 1172(42000):结果由多个行组成"
当它满足特定条件时,如何使用此变量(@number)更新另一个表?
I want to know if there is a way to select values from table into X so that X can hold more than 1 value in order to update another table with those values , what i am doing is this :
select number into @number from acct;
(This query return more than 1 number )
and it show this error (which is expected) "ERROR 1172 (42000): Result consisted of more than one row"
How can i use this variable (@number) to update another table when it meet a certain criteria ?
plz help and thnx for advance.
推荐答案
这篇关于从表中选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!