「Oracle入門」SELECT INTO文を実行するサンプル
SQL構文
DECLARE PA_USER MEMBERTBL.USERNAME%TYPE; PA_ADDR MEMBERTBL.ADDRESS%TYPE; BEGIN SELECT USERNAME,ADDRESS INTO PA_USER, PA_ADDR FROM MEMBERTBL WHERE USERNO = 12345; DBMS_OUTPUT.PUT_LINE(PA_USER||' '||PA_ADDR); END; /