title: Dynamic sql/query: apostrophe in SELECT
body: <p>So I have the problem, that there is a variable, which could contains different column names
   and then in the SELECT I want to compare the column with a specific word.
  But then it seems like the apostrophe make problems:</p>
  
  <pre><code>query := 'SELECT value FROM table WHERE ' || variable || ' like ''word''';
  EXECUTE IMMEDIATE query INTO rec;
    EXCEPTION WHEN OTHERS THEN htp.p(dbms_utility.format_error_stack);
  </code></pre>