在ORACLE下面如何执行SQL语句,就想DB2里面的DB2 -tvf test.sql这样执行呢?
我要的是在后台执行
如:
test.sql
select count(*) into record from test_tablesum = `db2 -tvf test.sql|grep ^[0-9]`
我要的是在后台执行
如:
test.sql
select count(*) into record from test_tablesum = `db2 -tvf test.sql|grep ^[0-9]`
解决方案 »
- 请教关于日志问题导致数据库无法打开
- 请高手指教,急急急,难度相当大
- 我在pl/sql里用order by排序1个字段没问题,但是写到我的程序里顺序就乱了
- update table set a='' where a is null为什么更新后a还是null那?
- Oracle存储相同的大对象该如何处理?高分回报~~~
- 求一sql语句
- oracle的用户名,密码,数据表等名称里是不是可以使用任何字符?
- 如何得到不是数字的数据集
- 几个小问题
- sql server2000 dts oracle9i
- 求sql , 存储过程 oralce 交叉表 单位按月份记量水电气
- oracle 10g的enterprise manager切换数据库登录是这样的
可以说一下你要实现的功能!
----------------------------
set serveroutput on;
declare
v_count number;
begin
select count(*) into v_count from test_table ;
dbms_output.put_line(v_count);
end;
quit;
调用:
sqlplus a/a@tns_name @test.sql
我在存储过程中用dbms_output.put_line(‘ttt')想打印出信息,可是执行过程后却没有打印出来create or replace procedure ods_proc_test
AS
begin
insert into test_table select * from test_table1;
exception
WHEN OTHERS then
dbms_output.put_line('sqlcode=['||sqlcode|']')
rollback;
end;
我编译后再
exec ods_proc_test后什么信息也没有打出来,这里一定有异常发生了