Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - SQL Usage » Stored Procedures and Triggers » Using procedures, triggers, and batches » Introduction to procedures

 

Altering procedures

You can modify an existing procedure using either Sybase Central or Interactive SQL. You must have DBA authority or be the owner of the procedure.

In Sybase Central, you cannot rename an existing procedure directly. Instead, you must create a new procedure with the new name, copy the previous code to it, and then delete the old procedure.

In Interactive SQL, you can execute an ALTER PROCEDURE statement to modify an existing procedure. You must include the entire new procedure in this statement (in the same syntax as in the CREATE PROCEDURE statement that created the procedure).

To alter the code of a procedure (Sybase Central)
  1. Connect to the database as a user with DBA or Resource authority.

  2. In the left pane, double-click Procedures & Functions.

  3. Select the procedure.

  4. Use one of the following methods to edit the procedure:

    • In the right pane, click the SQL tab.

    • Right-click the procedure and choose Edit In New Window.

      Tip

      You can open a separate window for each procedure and copy code between procedures.

    • To add or edit a procedure comment, right-click the procedure and choose Properties.

      If you use the Database Documentation Generator to document your SQL Anywhere database, you will have the option to include these comments in the output. See Documenting a database.

See also