日期:2014-05-17  浏览次数:20775 次

写一个shell脚本执行sql语句
写一个shell脚本执行insert into tt(id,name) select id,name from yy语句
test.sh

#!/bin/bash
sqlplus -s 'cisf/cisf23@cisfkfdb'<<EOF
set feed off
set heading off;
set feedback off;
set verify off;
insert into tt(id,name) select id,name from yy;
EOF

没写过shell脚本,大家帮我看看!

------解决方案--------------------
没什么大问题,就是在 EOF 之前,加一个 commit;