CALL statements invoke procedures. Procedures can be called by an application program or by other procedures and triggers.
You must be the owner of the procedure, have the EXECUTE privilege on the procedure, or have the EXECUTE ANY PROCEDURE system privilege.
All users who have been granted EXECUTE privilege for the procedure can call the procedure, even if they have no privilege on the table.
Execute the following statement to call a procedure and insert values:
CALL procedure-name( values );
After this call, you may want to ensure that the values have been added.
You can call a procedure that returns a result set by calling it in a query. You can execute queries on the result sets of procedures and apply WHERE clauses and other SELECT features to limit the result set.
The following statement calls the NewDepartment procedure to insert an Eastern Sales department:
CALL NewDepartment( 210, 'Eastern Sales', 902 );
After this call completes, you can to check the Departments table to verify that the new department has been added.
All users who have been granted EXECUTE privilege for the procedure can call the NewDepartment procedure, even if they have no privilege on the Departments table.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|