1、表空间'USER1'中无权限
没有把resource和connect 权限赋给用户,赋予权限:grant resource,connect to 用户名
2、超出表空间'USER1'的空间限量
应该是你创建表的用户在USERS表空间上的quota不足。
解决方法:
alter user scott quota 100M on
ts1;
3、出现符号
"end-of-file"在需要下列之一时: ;
<an
identifier>
<a double-quoted
delimited-identifier> delete exists
prior
<a single-quoted SQL string> 符号 ";"
被替换为 "end-of-file" 后继续。
create or replace procedure sp3
(spSno integer) is
--type sp_talbe_type is table of
v_sno sc.sno%type;
v_sname student.sname%type;
v_cno sc.cno%type;
v_grade sc.grade%type;
-- index by binary_integer;
type sp_cursor_type is ref cursor;
-- sp_table sp_table_type;
sp_cursor sp_cursor_type;
begin
open sp_cursor for
select sc.sno,student.sname,sc.cno,sc.grade
from student,sc
where student.sno=sc.sno and
sc.sno=spSno;
loop
fetch sp_cursor into v_sno,v_sname,v_cno,v_grade;
exit when sp_cursor%notfound;
dbms_output.put_line(v_sno||'
'||v_sname||'
'||v_cno||'
'||v_grade);
end loop;
end;
解决办法:最后一句要写成 end sp3;
4、出现符号 "END"在需要下列之一时: ;
<an
identifier>
<a double-quoted
delimited-identifier> 符号 ";" 被替换为 "END" 后继续。
create or replace procedure sp3
(spSno integer) is
--type sp_talbe_type is table of
v_sno sc.sno%type;
v_sname student.sname%type;
v_cno sc.cno%type;
v_grade sc.grade%type;
-- index by binary_integer;
type sp_cursor_type is ref cursor;
-- sp_table sp_table_type;
sp_cursor sp_cursor_type;
begin
open sp_cursor for
select sc.sno,student.sname,sc.cno,sc.grade
from student,sc
where student.sno=sc.sno and
sc.sno=spSno;
loop
fetch sp_cursor into v_sno,v_sname,v_cno,v_grade;
exit when sp_cursor%notfound;
dbms_output.put_line(v_sno||'
'||v_sname||'
'||v_cno||'
'||v_grade);
end
loop
end sp3;
解决办法:end loop后要加;
5、查看oracle中的procedures
select
object_name
from user_procedures
select
object_name
from
dba_procedures
where owner= '用户名 ';