Hello Experts, I am having two tables and I want to move the data from one table to another using mysql query. All the fields of first table(from which I want to move data) are in second table and two extra fields are there. I want to move the data of first table to second table when certain condition is satisfied. So, I have written query like, insert into table2('field1','field2','field3','field4','field5') select 'field1','field2','field3' from table1 where 'field1'<1,'field4 value','field5 value'; But it gave me error when I ran it.. What exactly I want to do is to insert all the values of first table into second one and two extra fields that are present in the second table. But I am not able to insert. Please help me if anybody have solution of this. Thanks in advance.
INSERT INTO table2 SELECT field1, field2, field3, 'value4', 'value5' FROM table1 WHERE field1 < 1 Code (markup):