shell编程中如何执行oracle语句
shell编程中如果向oracle中插入数据之类的,需要先把执行语句放到文件中,然后再@这个文件执行
有如下俩种方式供参考:
SQL=`sqlplus user/pwd@orains <<EOF
@Sqlfile
exit
EOF
`
或者
echo "exit"|sqlplus user/pwd@orains @sqlfile
关于本篇内容如有转载请注明出处;技术内容的探讨、纠错,请发邮件到70907583@qq.com
shell编程中如果向oracle中插入数据之类的,需要先把执行语句放到文件中,然后再@这个文件执行
有如下俩种方式供参考:
SQL=`sqlplus user/pwd@orains <<EOF
@Sqlfile
exit
EOF
`
或者
echo "exit"|sqlplus user/pwd@orains @sqlfile