# Using LIMIT in UPDATE

__*LIMIT clause*__

+ Quiz: Can you tell which row is going to be UPDATEd in advance?

```
tidb> SELECT * FROM test.r1;
+----+------+
| id | name |
+----+------+
|  1 | A    |
|  2 | C    |
+----+------+
2 rows in set (0.00 sec)

tidb> ~!@UPDATE test.r1 SET name='Z' WHERE id < 10 LIMIT 1;@!~
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

tidb> SELECT * FROM test.r1;
+----+------+
| id | name |
+----+------+
|  1 | ~!@Z@!~    |
|  2 | C    |
+----+------+
2 rows in set (0.01 sec)
```
------------------------------------------------------------
WARNING: The UPDATE statement in this example cannot determine which table row it modify, and LIMIT 1 cannot be used to determine which table row qualifies.

