SET @counter := 0; SELECT col_name, @counter := @counter+1 as counter FROM table_name
CREATE TABLE User (id INT PRIMARY KEY AUTO_INCREMENT,email)