Date: 06/20/02
- Next message: Denis Arh: "Re: [PHP-DB] E-mail address verification"
- Previous message: Rosen: "[PHP-DB] Copy table"
- Maybe in reply to: Rosen: "[PHP-DB] Copy table"
- Next in thread: Andy: "[PHP-DB] Re: Copy table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>> 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-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Denis Arh: "Re: [PHP-DB] E-mail address verification"
- Previous message: Rosen: "[PHP-DB] Copy table"
- Maybe in reply to: Rosen: "[PHP-DB] Copy table"
- Next in thread: Andy: "[PHP-DB] Re: Copy table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

