title: Insert into Table by getting NextVal of Sequence in PostgreSQL
body: <p>I have a table called SEQ_TABLE which has two columns, SEQ_NAME and ID</p>
  
  <pre><code>SEQ_NAME        |  ID
  ----------------------
  SEQ_TABLE_10    |   1
  SEQ_TABLE_20    |   5
  </code></pre>
  
  <p>Where ID is the Max of COLUMN_1 of TABLE_10 and TABLE_20</p>
  
  <p>Now, I have to Insert new records into TABLE_10 by obtaining <strong>nextvalue</strong> of sequence from <strong>SEQ_TABLE</strong>. </p>
  
  <p>I have written PostgreSQL query as follows:</p>
  
  <pre><code>INSERT INTO TABLE_10 (COLUMN_1, COLUMN_2, COLUMN_3) VALUES  ((SELECT nextval(SEQ_TABLE)),   'Bangalore' ,NULL);
  </code></pre>
  
  <p>When I execute above Query, It is giving below error:
  ********** Error **********</p>
  
  <pre><code>ERROR: column "SEQ_TABLE_10" does not exist
  SQL state: 42703
  Character: 99
  </code></pre>
  
  <p>But, following Query works fine in <strong>MySQL</strong> Database:</p>
  
  <pre><code>INSERT INTO TABLE_TABLE(COLUMN_1, COLUMN_2, COLUMN_3) VALUES  ((SELECT nextval('TABLE_172_SEQ','true')),    'Bangalore' ,NULL);
  </code></pre>
  
  <p>What is the Exact Postgres Query to achieve it in <strong>PostgreSQL</strong> DB?</p>