use test //
delimiter //
drop procedure if exists ptest3 //
create procedure ptest3(in tn char(20),out tt int)
begin
select `time` into tt from tn order by id limit 1;
end
|
如上,创建procedure已经成功.
调用时,
如果用call ptest3('b',@a);则提示:ERROR 1146 (42S02): Table 'test.tn' doesn't exist
如果用call ptest3(b,@a);则提示:ERROR 1054 (42S22): Unknown column 'b' in 'field list'
不知道错在哪里.