Answers

Question and Answer:

  Home  Scripting

⟩ How to connect to Oracle database, execute a script and assign its output to a shell variable?

count=`sqlplus -s $configuser/$configpass@$ORACLE_SID <<END

set pagesize 0 feedback off verify off heading off echo off;

select max(cust_id) from cutomers

exit;

END`

echo $count

 262 views

More Questions for you: