September 2010
Intermediate to advanced
1704 pages
111h 8m
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 28.10). 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 28.10 Modifying a Stored Procedure by Using ALTER PROCEDURE
Read now
Unlock full access