Answers for "how to create dynamic query in oracle"

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 "how to create dynamic query in oracle"

Code answers related to "SQL"

Browse Popular Code Answers by Language