shell编程中如何执行oracle语句
时间:2018-06-24 16:47:38
收藏:0
阅读:562
shell编程中如果向oracle中插入数据之类的,需要先把执行语句放到文件中,然后再@这个文件执行
有如下俩种方式供参考:
SQL=`sqlplus user/pwd@orains <<EOF
@Sqlfile
exit
EOF
`
或者
echo "exit"|sqlplus user/pwd@orains @sqlfile
原文:https://www.cnblogs.com/watertaro/p/9220807.html
评论(0)