【发布时间】:2017-07-16 05:08:40
【问题描述】:
我有客户表,我想返回客户信息并在本地变量中进行设置。
declare customerId int;
declare customerName varchar(50);
即
select customerId=id, customerName=name, address, salary from customers where id=1;
然后我想使用这些局部变量 customerId,customerName 来传递另一个函数。
即func(customerId,customerName);
但是当我在 mysql SP 中选择这些变量时,我得到空值。谁能告诉我该怎么做?
【问题讨论】: