Simon,
Thursday, July 18, 2002, 1:21:20 PM, you wrote:
>> I am trying to copy data from one table to another using in MySQL
>> INSERT INTO table1
>> SELECT table2
>> statment but I would like to add some fixed values to this and so some
>> thing like.
>> INSERT INTO table1
>> SELECT table2
>> VALUES ('A','B');
>> But I can not find if this can be done or how....
Not clear enough for me what do you want to do ..
What about:
INSERT INTO table1(field1,field2)
SELECT table2.field1, table2.field2
FROM table2
WHERE table2.field1='A'
AND table2.filed2='B';
For more details:
http://www.mysql.com/doc/I/N/INSERT_SELECT.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php