I need some help in mysql statement Ive table1 with 7 column and table 2 with 8 column the extra column named ranking , my statement should be like select all from table 1
INSERT INTO table2 SELECT @rank := @rank + 1, table1.* FROM table1 JOIN( SELECT @rank := 0 ) AS init ORDER BY number_of_users DESC