Re: Copying into another table
| From: | Alexander Weber | Date: | Fri, 16 Nov 2001 11:13:56 +0000 |
| Subject: | Re: Copying into another table | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74850@lists.php.net to get a copy of this message | ||
_lallous wrote:
>
> Hello!
>
> Is there is anyway to copy from a table to another but by applying a filter?
>
> Example:
>
> SELECT * FROM table1 WHERE (condition)
> INSERT INTO table2 (the results of the last query)
Just try this one:
INSERT INTO table2 SELECT * FROM table1 WHERE (condition)