求高手帮助 调用存储过程 表数据空白
以下为代码:delimiter //
create procedure proc_cursor()
begin
declare ID varchar(10) default' ';
declare user_name varchar(10) default' ';
declare user_pass varchar(10) default' ';
declare user_cursor cursor
for select ID,user_name,user_pass from test.user;
declare continue handler for not found set @dovar=1;
open user_cursor;
set @dovar = 0;
fetch_loop:loop
fetch user_cursor into ID,user_name,user_pass;
if @dovar = 1
then leave fetch_loop;
else select ID,user_name,user_pass;
end if ;
end loop fetch_LOOP;
close user_cursor;
select @dovar;
end;//
delimiter ;