title: Passing table name and column name dynamically to PL/SQL Stored procedure
body: <p>I am trying to pass table name and column name to a stored procedure in oracle , but it gives me following error: <code>table or view does not exist</code></p>
  
  <p>Below is the code: </p>
  
  <pre><code>create or replace procedure jz_dynamic_sql_statement
      (p_table_name    in varchar2,
       p_col1_name     in varchar2,
       p_check_result  out integer)
  
    as
  
      v_error_cd          est_runtime_error_log.error_cd%type;
      v_error_msg         est_runtime_error_log.error_msg%type;
      v_sql               varchar2(1024);
      v_result            number(10);
  
    begin
      v_result    := 0;
      v_sql       := 'select  count(*)  from ' || p_table_name ||' WHERE COLUMNNAME=' || p_col1_name;
  
  
      execute immediate v_sql into v_result;
      p_check_result := v_result;
  
    end;
  </code></pre>