CREATE PROCEDURE statement
456
♦ SELECT @variable =
♦ CASE
♦ LOOP
♦ LEAVE
♦ CONTINUE
♦ CALL
♦ EXECUTE
♦ SIGNAL
♦ RESIGNAL
♦ DECLARE
♦ SET VARIABLE
You should not use explicit error handling code with an ON EXCEPTION
RESUME clause.
$ For more information, see "ON_TSQL_ERROR option" on page 201.
EXTERNAL NAME clause A procedure using the EXTERNAL NAME
clause is a wrapper around a call to an external library. A stored procedure
using EXTERNAL NAME can have no other clauses following the
parameter list.
$ For information about external library calls, see "Calling external
libraries from procedures" on page 488 of the book ASA User’s Guide.
AT location-string clause Create a proxy stored procedure on the
current database for a remote procedure specified by location-string. The AT
clause supports the semicolon (;) as a field delimiter in location-string. If no
semicolon is present, a period is the field delimiter. This allows filenames
and extensions to be used in the database and owner fields.
For example, the following statement creates a proxy procedure (
remotewho
)
that calls the
dbo.sp_who
procedure on the
master
database of the
bostonase
server:
CREATE PROCEDURE remotewho ()
AT ’bostonase.master.dbo.sp_who
Remote procedures can return only up to 254 characters in output variables.
$ For information on remote servers, see "CREATE SERVER statement"
on page 464. For information on using remote procedures, see "Using remote
procedure calls (RPCs)" on page 914 of the book ASA User’s Guide.