Rename Trigger

This Article will help you to understand “RENAME Trigger” with example and it’s detailed description.

ALTER TRIGGER statement used to RENAME the trigger.

Example

We will create table “electricity_bill”.

Then create trigger “trg_rename_example” on electricity_bill table.

We will check the trigger status from “USER_TRIGGERS” table.

Then we will RENAME trigger by ALTER TRIGGER statement and then check again the USER_TRIGGERS table. You will notice new name of trigger in output.

Code
Output
table ELECTRICITY_BILL created.
Output
TRIGGER TRG_RENAME_EXAMPLE compiled
TABLE_NAME TRIGGER_NAME
ELECTRICITY_BILL TRG_RENAME_EXAMPLE
Output
trigger TRG_RENAME_EXAMPLE altered.

Now again check the USER_TRIGGERS table.

TABLE_NAME TRIGGER_NAME
ELECTRICITY_BILL TRG_NAME_UPDATED
References
  1. Syntax :- Oracle official docs
  2. PL/SQL Triggers :- Oracle official docs
It's good to share...Share on FacebookTweet about this on TwitterShare on LinkedInPin on PinterestShare on Google+Email this to someone

Leave a Reply

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