且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Shell脚本中运行SQL

更新时间:2023-02-07 08:00:37

#!/bin/ksh
variable1=$( 
echo "set feed off
set pages 0
select count(*) from table;
exit
"  | sqlplus -s username/password@oracle_instance
)
echo "found count = $variable1"