December 2013
Intermediate to advanced
1872 pages
153h 31m
English
You can modify the text of a stored procedure by using the ALTER PROCEDURE statement. The syntax for ALTER PROCEDURE is similar to the syntax for CREATE PROCEDURE (see Listing 24.11). Using ALTER PROCEDURE has a couple advantages over dropping and re-creating a procedure to modify it. The main advantage is that you don’t have to drop the procedure first to make the change, so it remains available, even if the ALTER PROCEDURE command fails due to a syntax or object reference error. The second advantage is that because you don’t have to drop the procedure, you don’t have to worry about reassigning permissions to it after modifying it.
LISTING 24.11 Modifying a Stored Procedure by Using ALTER PROCEDURE