Select Into

DECLARE
    v_last_name VARCHAR2(20);
BEGIN
    SELECT last_name INTO v_last_name FROM persons WHERE person_id = 1;
    DBMS_OUTPUT.PUT_LINE('Last name: ' || v_last_name);
END;
Comments