Download PL/SQL User's Guide and Reference
Transcript
Assignment Statement
DECLARE
emp_rec1
emp_rec2
dept_rec
BEGIN
...
emp_rec1
emp%ROWTYPE;
emp%ROWTYPE;
dept%ROWTYPE;
:= emp_rec2;
You can assign the value of an expression to a specific element in a collection, by
subscripting the collection name.
Examples
DECLARE
wages NUMBER; hours_worked NUMBER; hourly_salary NUMBER; bonus NUMBER;
country VARCHAR2(128);
counter NUMBER := 0;
done BOOLEAN;
emp_rec employees%ROWTYPE;
TYPE commissions IS TABLE OF NUMBER INDEX BY PLS_INTEGER;
comm_tab commissions;
BEGIN
wages := (hours_worked * hourly_salary) + bonus;
country := 'France';
country := UPPER('Canada');
done := (counter > 100);
emp_rec.first_name := 'Antonio';
comm_tab(5) := 20000 * 0.15;
END;
/
Related Topics
Constants and Variables, Expressions, SELECT INTO Statement
PL/SQL Language Elements
13-5
Related documents
PL/SQL User's Guide and Reference
Oracle Database PL/SQL User's Guide and Reference
PL/SQL User's Guide and Reference, Release 8.0
SQL*Loader Control File
A Software Application for a Car Sales and Servicing
Automated bookmark management
Migration Center User`s Manual
Peg Perego Prima Pappa Diner User's Manual
ソフトウェア工学
What is iSQL*Plus? - Oracle Documentation
Database Link User`s Manual