指定 操作员姓名 。查询过程与第一个查询相同
create procedure pro_funcnam(in name char(16))
begin
select T_func_item.func_name
from T_user inner join Relationship_2
on T_user.user_id = Relationship_2.user_id
inner join Relationship_1
on Relationship_2.func_role_id = Relationship_1.func_role_id
inner join T_func_item
on Relationship_1.func_id = T_func_item.func_id
where T_user.user_name = T_func_item.func_name;
end;
call pro_funcnam('1');
没有结果显示出来
你这又不是个函数,当然没有结果显示呀。
函数可以理解为是有返回值的过程,代码里必须要return对应的值,才能在调用的时候有结果显示出来