create or replace procedure pro_name
(spcode in number,
sppasswd in varchar2
)
is
v_name varchar2;
begin
select name into v_name from stu2 where stu1.code=spcode;
select name into v_name from stu2 where stu1.passwd=sppasswd;
dbms_output.put_line('用户名:'||v_name|| );
end;
create or replace procedure pro_name
(spcode in number,
sppasswd in varchar2
)
is
v_name varchar2(3000);
begin
select name into v_name from stu2 where stu1.code=spcode;
select name into v_name from stu2 where stu1.passwd=sppasswd;
dbms_output.put_line('用户名:'||v_name);
end;
系统提示Warning: compiled but with compilation errors。求高手帮忙指导下,我是在Toad For oracle 中编译的。
请帮我看下这个存储过程错在哪,谢谢。系统总是提示compiled but with compilation errors
答案:2 悬赏:0 手机版
解决时间 2021-03-17 04:48
- 提问者网友:沉默菋噵
- 2021-03-16 12:21
最佳答案
- 五星知识达人网友:梦中风几里
- 2021-03-16 13:09
create or replace procedure pro_name
(spcode in number,
sppasswd in varchar2
)
is
v_name varchar2 :='abc';
begin
--select name into v_name from stu2 where stu1.code=spcode;
--select name into v_name from stu2 where stu1.passwd=sppasswd;
dbms_output.put_line('用户名:'||v_name|| );
end;
--以下语句错误,可以换成其他语句看看
--select name into v_name from stu2 where stu1.code=spcode;
--select name into v_name from stu2 where stu1.passwd=sppasswd;
(spcode in number,
sppasswd in varchar2
)
is
v_name varchar2 :='abc';
begin
--select name into v_name from stu2 where stu1.code=spcode;
--select name into v_name from stu2 where stu1.passwd=sppasswd;
dbms_output.put_line('用户名:'||v_name|| );
end;
--以下语句错误,可以换成其他语句看看
--select name into v_name from stu2 where stu1.code=spcode;
--select name into v_name from stu2 where stu1.passwd=sppasswd;
全部回答
- 1楼网友:我住北渡口
- 2021-03-16 13:57
dbms_output.put_line('用户名:' ||v_name||);
|| 是连接符,用来连接字符串,上面的括号里v_name后有个多余的|| ,下面的应该救正确了
dbms_output.put_line('用户名:' ||v_name);
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯