If you want to update multiple rows using limit in MySQL you can use this construct:
UPDATE table_name SET name="test"
WHERE id IN (
SELECT id FROM (
SELECT id FROM table_name
ORDER BY id ASC
LIMIT 0, 10
) tmp
)
More Related Contents:
- MySQL – UPDATE query based on SELECT Query
- MySQL, update multiple tables with one query
- Why does MYSQL higher LIMIT offset slow the query down?
- MySQL update table based on another tables value
- mysql update column with value from another table
- Using variable in a LIMIT clause in MySQL
- Maximum number of records in a MySQL database table
- UPDATE multiple tables in MySQL using LEFT JOIN
- Combining UNION and LIMIT operations in MySQL query
- MySQL error code: 1175 during UPDATE in MySQL Workbench
- Does adding ‘LIMIT 1’ to MySQL queries make them faster when you know there will only be 1 result?
- How to set a maximum execution time for a mysql query?
- update multiple rows using limit in mysql?
- How can I speed up a MySQL query with a large offset in the LIMIT clause?
- MySQL update a joined table
- MySQL JOIN with LIMIT 1 on joined table
- MySQL: update a field only if condition is met
- Advanced MySql Query: Update table with info from another table
- What are differences between INSERT and UPDATE in MySQL?
- MySql Query: Select top 3 rows from table for each category
- Does MySQL overwrite a column of same value on update?
- MySQL UPDATE syntax with multiple tables using WHERE clause
- mySQL UPDATE query returns “0 rows affected”
- How to create and insert a JSON object using MySQL queries?
- The best way to remove value from SET field?
- MySQL: How do I use delimiters in triggers?
- Update MySQL with if condition
- Update multiple rows with multiple ‘where’ clauses for each individual row
- MySQL behavior of ON DUPLICATE KEY UPDATE for multiple UNIQUE fields
- MySQL update statement to store ranking positions