From: | Bricklen Anderson <BAnderson(at)PresiNET(dot)com> |
---|---|
To: | Sean Davis <sdavis2(at)mail(dot)nih(dot)gov> |
Cc: | Michael Romagnoli <michael(at)houseind(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Novice Question |
Date: | 2005-03-01 21:45:05 |
Message-ID: | 4224E261.4020407@PresiNET.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Sean Davis wrote:
>
> On Mar 1, 2005, at 4:23 PM, Michael Romagnoli wrote:
>
>>
>> I am new to postgresql, having previously worked with mysql mostly.
>>
>> What kind of command would I run if I wanted to copy an entire table
>> (along with renaming it, and, of course, all data from the first table
>> - some of which is binary)?
>>
>> Thanks,
>>
>> -Mike
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 3: if posting/reading through Usenet, please send an appropriate
>> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>> message can get through to the mailing list cleanly
>
>
> select * into table new_table from old_table;
>
> That's it.
>
> Sean
>
you sure about that syntax?
How about:
create table new_table as select * from old_table;
--
_______________________________
This e-mail may be privileged and/or confidential, and the sender does
not waive any related rights and obligations. Any distribution, use or
copying of this e-mail or the information it contains by other than an
intended recipient is unauthorized. If you received this e-mail in
error, please advise me (by return e-mail or otherwise) immediately.
_______________________________
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Patnude | 2005-03-01 22:00:08 | Re: Splitting tables or databases? That's the problem |
Previous Message | Edmund Bacon | 2005-03-01 21:43:11 | Re: Novice Question |