I would like to generate a line number for each line in the results of a sql query. How is it possible to do that?
Example: In the request
select di
OR you could also do
SELECT DISTINCT client_name, @num := @num + 1 AS lineNum(this is your new col) FROM deliveries JOIN (SELECT @num :=0) AS n ON 1=1;
hope this helps too :)