Copying a Stored Procedure

See Also

You can copy a stored procedure as the first step in creating a new stored procedure for your database. Because stored procedures must have names that are unique, the new stored procedure is automatically assigned a new unique name based on the original name.

To copy a stored procedure

  1. Open the Stored Procedure you want to copy in the text editor.

  2. Rename the stored procedure. For details, see Renaming a Stored Procedure.

  3. Save the stored procedure to the database.

The new stored procedure is added to the Stored Procedures folder with the name you specified. The original stored procedure is not removed.

Note   This process does not copy any privileges that may have been associated with the original stored procedure.

You can edit the SQL statements in the new stored procedure. For more information about editing stored procedures, see your database documentation.