from the docs;
The following will not yet work in MySQL:
SELECT * FROM table1 WHERE id IN (SELECT id FROM table2);
SELECT * FROM table1 WHERE id NOT IN (SELECT id FROM table2);
SELECT * FROM table1 WHERE NOT EXISTS (SELECT id FROM table2 where
table1.id=table2.id);
.
.
.
MySQL only supports INSERT ... SELECT ... and REPLACE ... SELECT ...
Independent sub-selects will probably be available in Version 4.0. You can
now use the function IN() in other contexts, however.
-----Original Message-----
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 1:41 PM
To: 'James Atkinson'; YoBro
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Move data from one MySql table to another?
> To populate new_table from old_table you can give it this SQL:
> INSERT INTO new_table (name, address) VALUES SELECT name, address FROM
> old_table;
Umm, I didn't think you could do subselects in MySQL?
Or am I missing something?
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]