如何在shell中调SQLPLUS 执行SQL语句
展开全部
[oracle@jumper oracle]$ cat tset.sh
sqlplus -S "/ as sysdba" << !
set heading off
col today noprint
column today new_val dat
select to_char( sysdate, 'yyyy-mm-dd') today from dual;
host echo 'today is ' &dat
exit;
exit;
!
[oracle@jumper oracle]$ ./test.sh
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询