Interview :: PL/SQL
When a trigger is associated to a view, the base table triggers are normally enabled.
A WHEN clause specifies the condition that must be true for the trigger to be triggered.
ALTER TRIGGER update_salary DISABLE;
DROP TRIGGER command.
Table columns are referred as THEN.column_name and NOW.column_name.
For INSERT related triggers, NOW.column_name values are available only.
For DELETE related triggers, THEN.column_name values are available only.
For UPDATE related triggers, both Table columns are available.
A stored procedure is a sequence of statement or a named PL/SQL block which performs one or more specific functions. It is similar to a procedure in other programming languages. It is stored in the database and can be repeatedly executed. It is stored as schema object. It can be nested, invoked and parameterized.
- Stored procedures and functions
- Packages
- Triggers
- Cursors
Oracle uses workspaces to execute the SQL commands. When Oracle processes a SQL command, it opens an area in the memory called Private SQL Area. This area is identified by the cursor. It allows programmers to name this area and access it?s information.
Implicit cursor is implicitly declared by Oracle. This is a cursor to all the DDL and DML commands that return only one row.
Explicit cursor is created for queries returning multiple rows.
The cursor attribute SQL%ROWCOUNT will return the number of rows that are processed by a SQL statement.