title: how to append two tables into one in postgresql
body: <p>I am looking for a way to append two tables in postgresql</p>
  
  <p>table_1 is like</p>
  
  <pre><code>name | age | grade
  aaa    20    A
  bbb    21    B
  </code></pre>
  
  <p>And table_2 is like</p>
  
  <pre><code>name | age | grade
  ccc    20     C
  ddd    22     A
  </code></pre>
  
  <p>What i am trying to do is append table_2 to table_1, so that table_1 will be</p>
  
  <pre><code>name | age | grade
  aaa     20   A
  bbb     21   B
  ccc     20   C
  ddd     22   A
  </code></pre>
  
  <p>Done these things. Like create a "sample.sql" file and try to run </p>
  
  <pre><code>database_name=# \i /path/to/sample.sql
  </code></pre>
  
  <p>It resulted in error. The statements in sample.sql file is</p>
  
  <pre><code>select * from table_1
  union
  select * from table_2
  insert into table_1;
  </code></pre>
  
  <p>I am new to the database thing. </p>