declare variable in MySQL with @
and assign with :=
SET @crs = 0; // declaration
--here your query
@crs := @crs+1 // assignment
References
More Related Contents:
- Out of memory Microsoft VBScript runtime error 800a0007
- Left Outer Join doesn’t return all rows from my left table?
- Are table names in MySQL case sensitive?
- MySQL: is a SELECT statement case sensitive?
- 1114 (HY000): The table is full
- Get table names using SELECT statement in MySQL
- ERROR 1396 (HY000): Operation CREATE USER failed for ‘jack’@’localhost’
- UPDATE multiple tables in MySQL using LEFT JOIN
- Can a foreign key reference a non-unique index?
- How to raise an error within a MySQL function
- What is maximum query size for mysql?
- Storing Data in MySQL as JSON
- Finding all parents in mysql table with single query (Recursive Query)
- How do I retrieve my MySQL username and password?
- How to execute a MySQL command from a shell script?
- Select most common value from a field in MySQL
- How does a MYSQL Self-Join Work?
- How to change the default port of mysql from 3306 to 3360
- Is it possible to reference one column as multiple foreign keys?
- What is the best MySQL collation for German language
- quick selection of a random row from a large table in mysql
- How to Import Multiple csv files into a MySQL Database
- MySQL error #2014 – Commands out of sync; you can’t run this command now
- How can we find gaps in sequential numbering in MySQL?
- Row to column transformation in MySQL
- Data truncated for column?
- Find date range overlaps within the same table, for specific user MySQL
- mysql select id and name from other table and join query
- MySQL “ERROR 1005 (HY000): Can’t create table ‘foo.#sql-12c_4’ (errno: 150)”
- Dump only the data with mysqldump without any table information?