There are already a lot of questions about running SQL*Plus from a shell script - is another one useful?
- Alex Poole
1 Answers
2
votes
sqlplus -s /nolog <<EOF
whenever sqlerror exit sql.sqlcode;
set echo on;
set serveroutput on;
connect <user>/<pass>@<host>:<port>/<sid>
delete from <table_name> where <...>;
...
quit;
EOF
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more