我的问题是将查询结果设置为变量。我可以在String中完成它,但是在Integer中。虽然我尝试了许多不同的解决方案但它不起作用。
这是我的代码:
declare pos_t int(2);
set @pos_t = (Select range_position from LIST_PRODUCT where column1 = @variable1 and column2= @variable2 limit 1);
@pos_t总是返回NULL
我尝试过Cast,转换,但它没有用。