What are the different schemas objects that can be created using PL/SQL?

Stored procedures and functions Packages Triggers Cursors In PL/SQL, you can create various schema objects. These objects are typically used to organize and manage database structures and data. The main types of schema objects that can be created using PL/SQL include: Stored Procedures: Stored procedures are named PL/SQL blocks that can be stored in the … Read more

What is stored Procedure?

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. A … Read more

What are the two virtual tables available at the time of database trigger execution?

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. In PL/SQL, when a database trigger is executed, two special virtual tables are available: OLD and NEW. These tables are … Read more

Which command is used to delete a trigger?

DROP TRIGGER command. In PL/SQL, there is no specific command exclusively designed to delete a trigger. Instead, you use the DROP TRIGGER statement to remove a trigger from the database. Here’s the basic syntax: DROP TRIGGER [schema.]trigger_name; Replace [schema.]trigger_name with the appropriate schema and trigger name you want to delete. For example: DROP TRIGGER my_schema.my_trigger; … Read more

How to disable a trigger name update_salary?

ALTER TRIGGER update_salary DISABLE; In PL/SQL, you can disable a trigger using the following SQL command: ALTER TRIGGER trigger_name DISABLE; So, to disable the trigger named update_salary, you would execute: ALTER TRIGGER update_salary DISABLE; This statement will prevent the trigger from firing until it is explicitly enabled again using the ENABLE option: ALTER TRIGGER update_salary … Read more