I want to know if it\'s possible to select incremented integer from mysql table? and if it does possible, how can I achieve that?
My case is, I have a bunch of data
Try this:
INSERT INTO newTable(someField, counter) SELECT a.someField, (@rank:=@rank+1) AS counter FROM sometable a INNER JOIN (SELECT @rank :=0) b