Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




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!















Oracle : Related Topics

Oracle : PL-SQL : Editing SQL within SQL-Plus
Oracle : PL-SQL : Formatting Records for Output Files in SQL-Plus

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2016 Stoltenbar Inc All Rights Reserved.