Hint:Parameter 'in' is declared but never used in 'query_student'

1、错误描述

Hint:Parameter 'in' is declared but never used in 'query_student'_第1张图片


2、错误原因

create or replace procedure query_student(in id int) is 
begin
  select * from t_stu_info t where t.id = id; end query_student;
编写Oracle存储过程时,传参时in、参数和参数类型位置不对


3、解决办法

create or replace procedure query_student(id in int) is 
begin
  select * from t_stu_info t where t.id = id; end query_student;

create or replace procedure query_student(id in int,name out varchar2) is 
begin
  select t.name into name from t_stu_info t where t.id = id; 
end query_student;
注意区别Oracle和MySQL两种数据库编写存储过程的写法

你可能感兴趣的:(Hint:Parameter 'in' is declared but never used in 'query_student')