create [orreplace] procedure 存储过程名(param1 intype,param2 outtype) as 变量1 类型(值范围); 变量2 类型(值范围); begin selectcount(*) into 变量1from 表A where列名=param1; if (判断条件) then select 列名 into 变量2from 表A where列名=param1; dbms_output.Put_line('打印信息'); elsif (判断条件) then dbms_output.Put_line('打印信息'); else raise 异常名(NO_DATA_FOUND); endif; exception when others then rollback; end;