Of Interest
Business Intelligence and Analytics
Oracle Training
|
Oracle
»
PL-SQL
»
SQL-Plus
»
Parameters-Pass
Passing parms to a SQL script via SQL-Plus
SQLPLUS allows dynamic variable substitution, from the command line.
Here's an example:
-- test1.sql
select count(1) from invoices where region=&1 ;
exit
-- Then, to run the SQL with the parm CANADA ..
os-prompt> sqlplus scott/tiger@myserver @test1.sql CANADA
Try running the SQL without that last parm - you will be prompted to key in the variable!
|
|
|
Get the latest Rocket99 news and tech tips via
|