10. In PL/SQL, how do you assign variables the same type as a column in the data
ID: 3711003 • Letter: 1
Question
10. In PL/SQL, how do you assign variables the same type as a column in the database? 11. How do you place the results of a SELECT command into variables in PL/SQL? 12. Can you use INSERT, UPDATE, or DELETE commands that affect more than one row in PLISQL procedures? 13. How do you use a SELECT command that retrieves more than one row in a PL/SOL procedure? 14. Which PL/SQL command activates a cursor? 15. Which PL/SQL command selects the next row in a cursor? 16. Which PL/SQL command deactivates a cursor? 17. How do you use SQL commands in Access? 19. How do you move to the next record in a recordset in Access? 20. What are triggers? What purpose do they serve?Explanation / Answer
20)Answer:
Triggers:
A database trigger is stored code that is executed immediately after a predefined event. It is used to ensure the coordinated performance of related actions. Although implementation varies, all major relational databases support triggers.
For example, a human resources (HR) application requires that every employee manager receive an informational e-mail immediately after an employee’s leave request is submitted. When a record is written into a table that stores employee leave requests, a created trigger fires and invokes the e-mail-sending procedure to the manager.
Another common trigger use is to save important original data, in its unchanged state, to maintain an audit trail or ensure that the original data remains accessible in the event of accidental changes. For example, the same HR application may contain a trigger that is executed when an employee's bank details are changed. The trigger first saves the original information to another table; this allows data modification.
Trigger is invoked by Oracle engine automatically whenever a specified event occurs.Trigger is stored into database and invoked repeatedly, when specific condition match.
Triggers are stored programs, which are automatically executed or fired when some event occurs.
Triggers are written to be executed in response to any of the following events.
Triggers could be defined on the table, view, schema, or database with which the event is associated.
Advantages of Triggers
These are the following advantages of Triggers:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.