看看执行sqlplus和执行存储过程的用户权限是否一样
解决方案 »
- use of non-migratable database link not allowed
- 求一个Oracle查count的语句
- 正确的存储过程执行exec出错 高手请进!!!!!!!!!!!
- 大侠请进!过程报错,ORA-00942: 表或视图不存在
- 一个数据分类汇总问题
- 求救,所有table、column的备注在服务器重启后都变成了?号??
- oracle初學者
- 公司开发一个大型电子商务网站,已经用ASP写了部分程序了,请问数据库是采用ORACLE好还是SQLSERVER好?
- 花它50分,请都一个不解处,这几天都在想这个问题?
- 这个触发器怎么写?
- DECODE 奇怪的问题,请教!!
- 我想在数据库操作中使用拼音查询中文名字怎么设置呢?
我已经给SELECT_CATALOG_ROLE了,还要什么权限,其实我在这2种情况都是同一个用户登录的。
2 cursor a1 is select column_name, data_type from all_tab_columns where owner='SCOTT' and table_name='A';
3 rst a1%rowtype;
4 begin
5 open a1;
6 if a1%isopen then
7 loop
8 fetch a1 into rst;
9 exit when a1%notfound;
10 dbms_output.put_line('table a has the column:'||rst.column_name);
11 dbms_output.put_line('the column type is:'||rst.data_type);
12 end loop;
13 end if;
14 close a1;
15* end;
SQL> /
table a has the column:COL
the column type is:NUMBER
table a has the column:TIME
the column type is:DATE我用scott/tiger这个用户进入sqlplus执行的,好像没什么问题。
估计你是没有把owner和table_name大写。
写成where owner=upper('xxx') and table_name=upper('xx')