shell脚本与sql文件传参,不使用存储过程

C:\tmp>type test.sql
set verify off
select '&1' from dual;
exit

C:\tmp>sqlplus username/password@server @test.sql "any string"

SQL*Plus: Release 9.2.0.1.0 - Production on 星期一 8月 6 13:37:12 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


连接到:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production


'ANYSTRING'
--------------------
any string

猜你喜欢

转载自aniyo.iteye.com/blog/2080673
今日推荐