Posted 17 October 2006 - 05:09 AM
and i want to insert the values into test1 from test2.
can i do like this?
insert into test1 values("select e_id, e_name from test2 where e_id>3");
can anyone solve this?
Posted 17 October 2006 - 07:34 AM
INSERT ... SELECT syntax
looks like you'd want something like:
INSERT INTO test1 (e_id, e_name) SELECT test2.e_id, test2.e_name FROM test2 WHERE test2.e_id > 3
can't guarantee the two-column SELECT will work, but it's worth a shot. it should probably work as long as you specify the column order in the INSERT INTO portion.
Posted 19 October 2006 - 04:11 PM
God may be a bit of an overstatement... but I'll settle for demi-god :-D
it's always nice to garner occasional support from the resident MySQL god .
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users