PL/SQL Best Practices

The primary purpose of PL/SQL coding
standards has always been to make maintenance easier for developers.
PL/SQL best practices make the job even easier. In order to satisfy
the requirement for making maintenance easier for the developers, PL/SQL coding standards must
address several areas of the development process. PL/SQL best
practices take the implementation of coding standards to a higher
level.

Use %TYPE and %ROWTYPE
attributes. No code change is required when schema structure
changes.

8) BEFORE VS AFTER TRIGGER

NEVER USE BEFORE TRIGGER FOR
VALIDATIONS. Use BEFORE triggers ONLY to modify :NEW value.

Oracle Documentation States:

"BEFORE row triggers are slightly more efficient than
AFTER row triggers. With
AFTER row
triggers, affected data blocks must be read (logical read, not
physical read) once for the trigger and then again for the
triggering statement. Alternatively, with BEFORE row
triggers, the data blocks must be read only once for both the
triggering statement and the trigger."

��

Burleson is the American Team

Note:This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.

Verify
experience!Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.

Errata? Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just e-mail:
and include the URL for the page.