Re: INSERT INTO table1 SELECT FROM table2...
| From: | JeongKook, Seo | Date: | Mon, 27 Nov 2000 04:06:07 +0000 |
| Subject: | Re: INSERT INTO table1 SELECT FROM table2... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27298@lists.php.net to get a copy of this message | ||
Oracle can support
insert into a_main as select * from main where somethong='something'
just add 'as'
----- Original Message -----
From: "Siim Einfeldt aka Itpunk" <siim_e@pshg.edu.ee>
To: <php-general@lists.php.net>
Sent: Sunday, November 26, 2000 10:28 PM
Subject: [PHP] INSERT INTO table1 SELECT FROM table2...
>
>
> INSERT INTO a_main SELECT * FROM main WHERE something='something'
> is it possible in theory? it gives me wrong paramete count error, but at
> the same time the tabels should be identical. Which might cause the
> probleme, is the primary key and auto_increment field in the target table,
> but I changed that, I deleted the primary key line from the a_main and
> deleted the auto_increment atribute from the first line as well. But the
> result is the same. What might be causing the problem?
>
> Yes, possibly I could write it all down like INSERT INTO a_main
> (col1,col2,etc) SELECT col1,col2,etc FROM main, but as I have about 10
> tables and in all of them I have about 20 fields and I need to archive
> them all together with a mouse click....this would just be too painful to
> write it all out.
>
> What are your suggestions?
>
>
> Thanks
> Siim
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>