# Example: Using `LIMIT` in `UPDATE`

__*LIMIT clause*__

+ Quiz: Can you tell which planet is going to be updated in advance?

```
tidb> SELECT name, gravity, ring_systems FROM planets WHERE gravity < 6;
+---------+---------+--------------+
| name    | gravity | ring_systems |
+---------+---------+--------------+
| Mercury |     3.7 |            0 |
| Mars    |     3.7 |            0 |
| Pluto   |     0.7 |            0 |
+---------+---------+--------------+
3 rows in set (0.00 sec)

tidb> UPDATE planets SET ring_systems = 1 WHERE gravity < 6 ~!@LIMIT 1;@!~
Query OK, ~!@1 row affected@!~ (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

tidb> SELECT name, gravity, ring_systems FROM planets WHERE gravity < 6;
+---------+---------+--------------+
| name    | gravity | ring_systems |
+---------+---------+--------------+
| Mercury |     3.7 |            ~!@1@!~ |
| Mars    |     3.7 |            0 |
| Pluto   |     0.7 |            0 |
+---------+---------+--------------+
3 rows in set (0.00 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.

