Specifies parameters to an Interactive SQL command file.
parameters parameter1, parameter2, . . .
This Interactive SQL command file takes two parameters:
parameters department_id, file; select emp_lname from employee where dept_id = {department_id} >#{file}.dat
If you save this script in a file named test.sql, you can run it from Interactive SQL using the following command:
read test.SQL [100] [data]
The parameters statement names the parameters for a command file, so that they can be referenced later in the command file.
Parameters are referenced by putting {parameter1}
into
the file where you want the named parameter to be substituted. There
cannot be any spaces between the braces and the parameter name.
If a command file is invoked with less than the required number of parameters, Interactive SQL prompts for values of the missing parameters.
Any user can execute this command.