Updating salary for different departments using cursor mein fickdate Göttingen

Posted by / 18-Oct-2017 08:17

Updating salary for different departments using cursor

For example, When you execute INSERT, UPDATE, or DELETE statements the cursor attributes tell us whether any rows are affected and how many have been affected. INTO statement is executed in a PL/SQL Block, implicit cursor attributes can be used to find out whether any row has been returned by the SELECT statement. The status of the cursor for each of these attributes are defined in the below table.

In the above PL/SQL Block, the salaries of all the employees in the ‘employee’ table are updated.

We can pass parameters to procedures in three ways.

1) IN-parameters 2) OUT-parameters 3) IN OUT-parameters A procedure may or may not return any value.

is a named PL/SQL block which performs one or more specific task.

A cursor contains information on a select statement and the rows of data accessed by it.

This indicates the oracle engine that the PL/SQL program has ended and it can begin processing the statements.

We have two parameter markers in our example (one as part of the SET clause expression and one in the WHERE clause), so we must list the host variables in the USING clause in the sequence the corresponding parameter markers appear in the SQL statement.

Secondly, the use of parameter markers greatly reduces the opportunity for any SQL injection threat to occur. INTO form doesn’t work in dynamic SQL, so you must use a cursor.

So that’s how we can dynamically handle direct “set at a time” updates and deletes. So imagine that in the example we just looked at, rather than updating all rows that met the WHERE clause selection criteria immediately, there was a bit more RPG logic that had to take place before the update happened (e.g., perhaps a user must manually enter the information about how much each employee’s salary change would be).

updating salary for different departments using cursor-20updating salary for different departments using cursor-6updating salary for different departments using cursor-51

One thought on “updating salary for different departments using cursor”

  1. Expensive collectible watches, valued more for their elaborate craftsmanship, aesthetic appeal and glamorous design than for simple timekeeping, often have traditional mechanical movements, even though they are less accurate and more expensive than electronic ones.

  2. By registering for TCC, you become a member of the Service (a "Member"), and you agree to be bound by the terms and conditions of this Agreement (the "Terms") for as long as you continue to be a Member. YOUR CONTINUED USE OF THE SERVICE CONSTITUTES YOUR ACCEPTANCE OF ANY CHANGES.