I have two sql queries…
set @count:=0;
select @count:=@count+1 as SNO, col1, col2 FROM table;
I want to combine above queries into a single query. Any Help?
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.
You can simply do this,
Just like adding RowNumber for each row
Adding RowNumber in MySQL