develooper Front page | perl.beginners | Postings from January 2002

Re: COPY TABLE

Thread Previous
From:
Jenda Krynicky
Date:
January 4, 2002 13:42
Subject:
Re: COPY TABLE
Message ID:
3C362FAD.13834.14D61F23@localhost
From:           	"nafiseh saberi" <nsaberi@iraninfocenter.net>
> how can I copy one table to another table ???
> do we have one command for it in sql ??
> 
> thx a lot.
> ________________________________
> Sincerely yours     Nafiseh Saberi  

And why are you asking here?

Anyway you could have told us at least WHAT DATABASE are 
you using.

Basicaly if both the tables are in the same database an SQL like 
this should do:

	insert into Table2 ( Column1, Column2, Column3)
	select Column1, Column2, Column3 from Table1

But of course this may depend on the database.

Jenda

P.S.: Would you please read this? 
http://www.tuxedo.org/~esr/faqs/smart-questions.html

== Jenda@Krynicky.cz == http://Jenda.Krynicky.cz ==
: What do people think?
What, do people think?  :-)
             -- Larry Wall in <199808071736.KAA12738@wall.org>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About