Knowledge Walls
John Peter
Pune, Maharashtra, India
SELECT Query Serial no creation in Smart Tricks of MySQL
How to create serial number in SELECT Query?
SET @sno := 0;
SELECT (@sno := @sno + 1) as Sno,roll_no,user_name FROM students;


SELECT (@sno := @sno + 1) as Sno,roll_no,user_name FROM students, (SELECT @sno := 0) as ini;
Best Lessons of "MySQL"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details