Re: Copy table
| From: | Martin Clifford | Date: | Thu, 20 Jun 2002 13:53:08 +0000 |
| Subject: | Re: Copy table | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19902@lists.php.net to get a copy of this message | ||
If you have two tables, users and guests, and want to copy from the former to the latter, it'd
be done like this:
INSERT INTO database.guests SELECT * FROM database.users
It goes without saying that you'd have to create the guests table before this would work.
HTH
Martin
>>> "Rosen" <rosen@pernikinfo.com> 06/20/02 09:46AM >>>
Hi,
I want to copy data from one table to another ( some fields with same names)
with some condition.
How can I do this ?
Thanks,
Rosen
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php