Which of the following are valid SQL statements inside PL SQL block?
The DML statements used inside a PL/SQL block are:
- INSERT: This command allows you to insert or add data value in the database table.
- UPDATE: This command allows you to update any data from any row or a column in the database.
- DELETE: It is used to delete an entire record that is available in the database table.
In which part of PL SQL block the executable statements must be included?
The declarative part of a PL/SQL block is optional. It is terminated implicitly by the keyword BEGIN , which introduces the executable part of the block.
When should a close statement be used in PL SQL?
After all rows have been retrieved from the result set that is associated with a cursor, the cursor must be closed. The result set cannot be referenced after the cursor has been closed. However, the cursor can be reopened and the rows of the new result set can be fetched.
Where is PL SQL used?
PL/SQL can execute a number of queries in one block using single command. One can create a PL/SQL unit such as procedures, functions, packages, triggers, and types, which are stored in the database for reuse by applications.
|Mainly used to manipulate data.||Mainly used to create an application.|
What are triggers in PL SQL?
A PL/SQL trigger is a named database object that encapsulates and defines a set of actions that are to be performed in response to an insert, update, or delete operation against a table. Triggers are created using the PL/SQL CREATE TRIGGER statement.