PROCEDURE Clause (SQL Only)
See Also Example
An SQL procedure consists of a PROCEDURE clause (which specifies the name of the procedure), a list of parameter definitions, and a single SQL statement For example, the procedure Get_Part_Number might execute a query that retrieves a specified part number..
This version of SQL implements PROCEDURE for compatibility with SQL statements you might copy from other applications. If you use a PROCEDURE clause, don't use the PARAMETERS declaration to specify query parameters.
PROCEDURE is optional but when included is the first clause in the SQL statement.
A PROCEDURE clause has the following syntax:
PROCEDURE procedurename [parametername parameterdatatype];
The name procedurename must follow standard naming conventions.
If the clause includes more than one parametername-parameterdatatype pair, separate them with commas. The following are valid PROCEDURE clauses:
PROCEDURE Sales_By_Country [Beginning Date] DateTime, [Ending Date] DateTime;
When you use a PROCEDURE clause, Visual Basic removes the clause from the SQL statement. Removing the PROCEDURE clause doesn't affect the result of the query. If the PROCEDURE clause includes parameters, Visual Basic replaces PROCEDURE and procedurename with the PARAMETERS reserved word; the parameters are not removed.