INSERT INTO table2 (st_id,uid,changed,status,assign_status) SELECT st_id,from_uid,now(),'Pending','Assigned' FROM table1