I have been searching to find a proper solution. Following is my table.i don't want to use a temporary table. Please help me
mysql> select * from Employees;
+-------+------+-----+--------+
| Empid | Name | Did | Salary |
+-------+------+-----+--------+
| 123   | a    | 1   |  10000 |
| 321   | b    | 2   |  20000 |
| 421   | c    | 2   |  20000 |
| 521   | c    | 2   |  20000 |
| 621   | e    | 2   |  35000 |
| 821   | b    | 1   |  30000 |
| 4545  | s    | 1   |     14 |
| 1111  | k    | 1   |      0 |
| 1111  | k    | 1   |      0 |
| 1111  | k    | 1   |   3445 |
| 1111  | k    | 1   |      0 |
| 1111  | k    | 1   |  35000 |
| 1111  | k    | 6   |  35000 |
| 123   | a    | 1   |  10000 |
+-------+------+-----+--------+
14 rows in set (0.01 sec)
I tried using @rownum but throwing the following error
ERROR 1093 (HY000): You can't specify target table 'Employees' for update in FROM clause
tried alias but seem's to be not working.
Specs: Server version: 5.5.35-0ubuntu0.12.04.2 (Ubuntu), MYISAM engine, no primary key
 
    