Index | Home | Forums
Oracle PL/SQL Example 6-3 Substituting PL/SQL Variables

Example 6-3 Substituting PL/SQL Variables

CREATE TABLE employees_temp AS SELECT first_name, last_name FROM employees;
DECLARE
   x VARCHAR2(20) := 'my_first_name';
   y VARCHAR2(25) := 'my_last_name';
BEGIN
   INSERT INTO employees_temp VALUES(x, y);
   UPDATE employees_temp SET last_name = x WHERE first_name = y;
   DELETE FROM employees_temp WHERE first_name = x;
   COMMIT;
END;
/


This page was generated on/at Feb 23,2008 00:20:12
General comments and questions regarding this document should be sent by email to info@oracleabc.com or post your comments here




Index | Home | Forums
Oracle PL/SQL Example 6-3 Substituting PL/SQL Variables

Example 6-3 Substituting PL/SQL Variables

CREATE TABLE employees_temp AS SELECT first_name, last_name FROM employees;
DECLARE
   x VARCHAR2(20) := 'my_first_name';
   y VARCHAR2(25) := 'my_last_name';
BEGIN
   INSERT INTO employees_temp VALUES(x, y);
   UPDATE employees_temp SET last_name = x WHERE first_name = y;
   DELETE FROM employees_temp WHERE first_name = x;
   COMMIT;
END;
/


This page was created by oracleabc.com on Feb 23,2008 00:09:02
General comments and questions regarding this document should be sent by email to info@oracleabc.com or post your comments here