Answers for "oracle dynamic select into"

SQL
0

oracle dynamic select into

SET SERVEROUTPUT ON;
DECLARE
    sql_qry     VARCHAR2 (150);
    emp_tot     NUMBER(3);
BEGIN
    
    sql_qry:= 'SELECT count (*) FROM employees';
    EXECUTE IMMEDIATE sql_qry INTO emp_tot;
    DBMS_OUTPUT.PUT_LINE ('Total employees are: '||emp_tot);

END;
Posted by: Guest on March-10-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language