SQL> CREATE TABLE T1 (
2 e INTEGER,
3 f INTEGER );
Table created.
SQL> DELETE FROM T1;
0 rows deleted.
SQL> INSERT INTO T1 VALUES(1, 3);
1 row created.
SQL> INSERT INTO T1 VALUES(2, 4);
1 row created.
/* Above is plain SQL; below is a PL/SQL program. */
SQL> DECLARE
2 a NUMBER;
3 b NUMBER;
4 BEGIN
5 SELECT e, f INTO a, b FROM T1 WHERE e > 1;
6 INSERT INTO T1 VALUES( b, a );
7 END;
8 /
PL/SQL procedure successfully completed.
|
|
|
|