informix存储过程
各位好,请大家多多指点我写了个存储过程,用来统计设备数量,传两个参数
create procedure testprocedure(tablename varchar,status int)
returning int;
define countEdis int;
select count(*) into countEdis from tablename where confirmed = status;
return countEdis;
end procedure;
execute 时出现错误信息:
206: The specified table (tablename) is not in the database.(我确信表在数据库中存在)
111: ISAM error:no record found. 存储过程中不支持动态sql语句。
你的tablename是通过参数传进来的,是个变量,这里不支持。
页:
[1]