Generate Serial Number in SQL
The next query generates results as below. Suppose we want to add a column with serial numbers, just as below. In MySQL, this can be done by defining a variable in the query: Reference: MySQL User Defined Variables
The next query generates results as below. Suppose we want to add a column with serial numbers, just as below. In MySQL, this can be done by defining a variable in the query: Reference: MySQL User Defined Variables