CREATE PROCEDURE Statement

Microsoft Office Access 2003

CREATE PROCEDURE Statement

Creates a stored procedure .

Note  The Microsoft Jet database engine does not support the use of CREATE PROCEDURE, or any of the DDL statements, with non-Microsoft Jet database engine databases.

Syntax

CREATE PROCEDURE procedure
[param1 datatype[, param2 datatype[, ...]] AS sqlstatement

The CREATE PROCEDURE statement has these parts:

Part Description
procedure A name for the procedure. It must follow standard naming conventions .
param1, param2 From one to 255 field names or parameters . For example:

CREATE PROCEDURE Sales_By_Country [Beginning Date] DateTime, [Ending Date] DateTime;

datatype One of the primary Microsoft Jet SQL Data Types or their synonyms.
sqlstatement An SQL statement such as SELECT, UPDATE, DELETE, INSERT, CREATE TABLE, DROP TABLE, and so on.

Remarks

An SQL procedure consists of a PROCEDURE clause that specifies the name of the procedure, an optional list of parameter definitions, and a single SQL statement .

A procedure name cannot be the same as the name of an existing table.

See Also
ADD USER Statement CREATE USER or GROUP Statement
ALTER USER or DATABASE Statement CREATE VIEW Statement
ALTER TABLE Statement DROP Statement
CONSTRAINT Clause DROP USER or GROUP Statement
CREATE INDEX Statement GRANT Statement
CREATE TABLE Statement REVOKE Statement
PARAMETERS Declaration