Create Synonym for Stored Procedure in Oracle

The following is an example of CREATE SYNONYM for Oracle Stored Procedure.

Create Synonym Example For Stored Procedure

For example, you have created a stored procedure named proc_customer, and you want to create a synonym for that. Then your CREATE SYNONYM statement should be as below.

CREATE OR REPLACE SYNONYM syn_proc_customer for proc_customer;

You can give the same name to synonym as procedure's name.

CREATE OR REPLACE SYNONYM proc_customer for proc_customer;

Grant Permission For Synonym

GRANT EXECUTE ON syn_proc_customer TO SCOTT;

See also:

Written by Vinish Kapoor

An Oracle Apex Consultant, Oracle ACE, and founder of and a question and answer forum for developers. You can connect with me on Facebook and Twitter.

Leave a Reply

Your email address will not be published. Required fields are marked *