Skip to content

Instantly share code, notes, and snippets.

@velppa
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velppa/2e676d682894e0a82776 to your computer and use it in GitHub Desktop.
Save velppa/2e676d682894e0a82776 to your computer and use it in GitHub Desktop.
PL/SQL notes

PL-SQL Notes

Triggers

  • The trigger body is a PL/SQL block in which you can issue both SQL and PL/SQL statements from the trigger body. You can also call a stored procedure or a Java procedure from the trigger body. You can also invoce a procedure developed using object-oriented languages, such as C.

  • USER_PROCEDURES and USER_OBJECTS views - object status is in USER_OBJECTS view only.

  • TRIGGERS: which trigger is valid for timing information (correct - BEFORE, I chose INSTEAD)

  • DDL triggers fire for clusters, functions, indexes, packages, procedures, roles, sequences, tables, tablespaces, triggers, types, views, or users.

  • Parts of trigger declaration (body, type, timing, event) - what they are?

  • No BEFORE LOGON trigger exists.

Datatypes

  • Difference between two timestamps is an interval datatype; Difference between two dates is a number

Data Dictionary Objects

  • USER_ERRORS have information about compilation errors

Packages

  • If only package body is changed without changing package specification, then no dependent procedures are invalidated. If the package specification changes then dependent procedures/functions are invalidated as is the package body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment