DECLARE
v_emp_id number;
v_emp_name varchar2(50);
v_dyn_sql varchar2(1000);
BEGIN
v_emp_id :=10;
v_dyn_sql := 'select first_name from employees where employee_id = '|| v_emp_id;
Execute immediate v_dyn_sql  into v_emp_name;
dbms_output.put_line(v_emp_name);
EXCEPTION WHEN NO_DATA_FOUND
THEN dbms_output.put_line('No such employee');
END;
