Program using cursor for updating salary of employee uomo donna dating it
When you fetch a row the current row position moves to next row.
By extending SQL, PL/SQL offers a unique combination of power and ease of use.
A cursor can hold more than one row, but can process only one row at a time.
The set of rows the cursor holds is called the set.
It is a combination of SQL along with the procedural features of programming languages and it enhances the capabilities of SQL by injecting the procedural functionality, like conditional or looping statements, into the set-oriented SQL structure.
PL/SQL can only use SELECT, DML(INSERT, UPDATE, DELETE) and TC(COMMIT, ROLLBACK, SAVEPOINT) statements, DDL (CREATE, ALTER, DROP) and DCL(GRANT, REVOKE) cannot be used directly.
In addition to static SQL discussed in this chapter, PL/SQL also supports dynamic SQL, which enables you to execute SQL data definition, data control, and session control statements dynamically.
Each PL/SQL program consists of SQL and PL/SQL statements which form a PL/SQL block.Notice the value of %ROWCOUNT when too many rows are returned.PL/SQL stands for Procedural Language extension of SQL.Command lines are not pretty (in fact, DB2 on Windows gained a reputation as "powerful not pretty" when it was first released on NT before the Control Center was available).Command lines remind us of Telnet on UNIX, and the original DOS prompt from 1981.