Re: Concatenate two tables

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Alexander Pucher <pucher(at)atlas(dot)gis(dot)univie(dot)ac(dot)at>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Concatenate two tables
Date: 2002-12-08 22:08:52
Message-ID: 1039385332.1071.167.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Sun, 2002-12-08 at 21:38, Alexander Pucher wrote:
> Hi,
>
> I have two tables with identical table stucture. How can i add all rows
> from table2 into table1, i.e concatenate the two tables.

INSERT INTO table1 (SELECT * FROM table2);

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"For I am the LORD your God; ye shall therefore
sanctify yourselves, and ye shall be holy; for I am
holy." Leviticus 11:44

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Weaver 2002-12-09 03:16:20 Default Permissions
Previous Message Harry 2002-12-08 22:03:02 Re: Concatenate two tables