Try this on
SELECT @s:=@s+1 serial_number,student_id,student_name,student_avg
FROM students,
(SELECT @s:= 0) AS s
WHERE
student_avg > 4;
More Related Contents:
- convert mysql query to laravel query builder
- how to generate report for attendance system
- How can I return pivot table output in MySQL?
- MySQL pivot table query with dynamic columns
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
- Error installing mysql2: Failed to build gem native extension
- How to debug Lock wait timeout exceeded on MySQL?
- How to send email from MySQL 5.1
- MySQL skip first 10 results
- Import Data from Excel Spreadsheet or CVS into MySQL
- MySQL vs MongoDB 1000 reads
- How to convert all tables from MyISAM into InnoDB?
- How can I get rid of these comments in a MySQL dump?
- How to create relationships in MySQL
- Lost connection to MySQL server during query? [duplicate]
- Difference between LIKE and = in MYSQL?
- node.js + mysql connection pooling
- how to get last insert id after insert query in codeigniter active record
- Bug? #1146 – Table ‘xxx.xxxxx’ doesn’t exist
- What resources exist for Database performance-tuning? [closed]
- dump all mysql tables into separate files automatically?
- Higher cardinality column first in an index when involving a range?
- Native JSON support in MYSQL 5.7 : what are the pros and cons of JSON data type in MYSQL?
- Using % for host when creating a MySQL user
- Mysql Join Two tables on keys
- Getting percentage of “Count(*)” to the number of all items in “GROUP BY”
- Surpassing MySQL’s TIME value limit of 838:59:59
- MySQL for replace with wildcard
- How can a query multiply 2 cell for each row MySQL?
- Rails select random record