在存储过程中,已经获取到表,保存在定义的变量table_name中,下接下来的操作中,我怎么样使用这个表作查询操作?
如:
declare cursor mycur is select count(1) from 表名 where 条件
或这样:
totalcount := select count(1) from 表名 where 条件表名的地方应该怎么把上面的table_name加进去?谢谢!!!!
如:
declare cursor mycur is select count(1) from 表名 where 条件
或这样:
totalcount := select count(1) from 表名 where 条件表名的地方应该怎么把上面的table_name加进去?谢谢!!!!
查询语句怎么写。
这种方式编译是成功了,但是在使用执行命令:
exec procedurename;
的时候,执行不了,报:ORA_00900:invalid sql statement
也就是要看看table_name里面是不是表名字.
我就只执行你上面提到的一句,但还是报同样的错,存储过程在pl/sql中编译之后,还要做什么操作啊?