1SET SERVEROUTPUT ON;
2DECLARE
3 sql_qry VARCHAR2 (150);
4 emp_tot NUMBER(3);
5BEGIN
6
7 sql_qry:= 'SELECT count (*) FROM employees';
8 EXECUTE IMMEDIATE sql_qry INTO emp_tot;
9 DBMS_OUTPUT.PUT_LINE ('Total employees are: '||emp_tot);
10
11END;