For example I have a table. With a field Idnumber. And the field has 10 data(ex: 1234, 1235, 1236, etc) And I have another table, subjects. Is it possible to import the data that is in the table student(field idnumber) and put it on the table subjects(field idnumber)? So that I won't have to copy and paste the data that is in the source table to the destination table. I'm talking about phpmyadmin
+1
A:
Perhaps something like this?
INSERT INTO `subjects`(`idnumber`) SELECT `idnumber` FROM `studends`;
The INSERT command can use data provided by a simple SELECT
, so you can "copy" data from one table to another using this kind of syntax.
Atli
2010-03-06 01:36:12
yeah thanks, im not using my mind again
2010-03-06 01:39:11