%Type

DECLARE
    v_last_name persons.last_name%TYPE;
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