create or replace procedure xh_procedure_1(x_sex in userinfo.sex%type) as
x_count number;
begin
if x_sex = 'M' then
select count(*) into x_count from userinfo where sex = 'M';
dbms_output.put_line(x_count);
else
x_sex = 'F' then
select count(*) into x_count from userinfo where sex = 'F';
dbms_output.put_line(x_count);
end if;
end xh_procedure_1;begin
xh_procedure_1('M');
end;对象xh_procedure_1无效存储
x_count number;
begin
if x_sex = 'M' then
select count(*) into x_count from userinfo where sex = 'M';
dbms_output.put_line(x_count);
else
x_sex = 'F' then
select count(*) into x_count from userinfo where sex = 'F';
dbms_output.put_line(x_count);
end if;
end xh_procedure_1;begin
xh_procedure_1('M');
end;对象xh_procedure_1无效存储
解决方案 »
- imp命令导入dmp文件,提示IMP-00003:ORA-23404:ORA-06512:IMP-00017: ORA-00001: 等错误
- sql 优化
- 我要疯了!数据库表搞N层!搞N多个外键!我怎么办?这怎么让我做开发呀!
- 创建表报00922错误!
- 请高人帮我写条SQL,在线等
- 如和把数据库中一个用户所建的表导出,转入另一个相同数据库?急!!!
- 如何用sql查出表关系
- int类型到底是number(?)
- exp出错,请大家帮忙看看
- 在asp中如何调用oracle 包中的储存过程,使用的是adodb.connection方法连接数据库
- sql语句怎么拼能满足这个功能
- 谁能给我一个oracle数据库表空间监控工具啊?求表空间监控工具...急!急!!急!急!急! 在线等啊
select count(*) into x_count from userinfo where sex = 'M';
dbms_output.put_line(x_count);
elsif
x_sex = 'F' then
select count(*) into x_count from userinfo where sex = 'F';
dbms_output.put_line(x_count);另外为什么不用where sex=x_sex