O'Reilly logo

Oracle and PL/SQL Recipes: A Problem-Solution Approach by Matt Arena, Josh Juneau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12-11. Creating a Trigger

Problem

You need to create a DML database trigger that validates data prior to inserting it into a table, and you want to use Oracle SQL Developer to do so. For instance, you want to create a trigger that will validate an e-mail address prior to inserting a row into the EMPLOYEES table.

Solution

Use the Create Trigger Wizard, type the PL/SQL trigger code into a SQL worksheet, or use the trigger options that are available from the database table worksheet. To start the wizard, go to the File menu and select the New option. Once the Create a New dialog box opens, select Trigger. This will open the Create Trigger window, as shown in Figure 12-34.

Figure 12-34. Creating a new trigger

The Create Trigger window simplifies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required