Here is my MySQL query:
SELECT name FROM table;
How can I also select an increment counter alongside name? Expected output:
Jay 1
roy 2
ravi 3
ram 4
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This part:
makes it possible to introduce a variable without the need of a seperate query. So the first query could also be broken down into two queries like this:
for instance when used in a stored procedure.