How to copy a table?

Started by Jeff Luabout 25 years ago2 messagesgeneral
Jump to latest
#1Jeff Lu
jklcom@mindspring.com

Hi,

Can some one show me what's the best way to backup a table or copy a table?

Thanks

#2Zak McGregor
zak@mighty.co.za
In reply to: Jeff Lu (#1)
Re: How to copy a table?

On Mon, 26 Mar 2001 21:21:12 -0500
"Jeff" <jklcom@mindspring.com> wrote:

Hi,

Can some one show me what's the best way to backup a table or copy a table?

Backing up is simple with pg_dump and pg_dumpall.

Copying a table (assuming within the same database) is also easy:

create table test as select * from other_table;

HTH

Zak