Try this
UPDATE `table` SET `uid` = CASE
WHEN id = 1 THEN 2952
WHEN id = 2 THEN 4925
WHEN id = 3 THEN 1592
ELSE `uid`
END
WHERE id in (1,2,3)
More Related Contents:
- Should I use the datetime or timestamp data type in MySQL?
- Delete all Duplicate Rows except for One in MySQL? [duplicate]
- MySQL string replace
- What is the difference between utf8mb4 and utf8 charsets in MySQL?
- How do I find the MySQL my.cnf location
- How do I get the current time zone of MySQL?
- What’s faster, SELECT DISTINCT or GROUP BY in MySQL?
- MySQL select one column DISTINCT, with corresponding other columns
- How to export a mysql database using Command Prompt?
- How to fill in the “holes” in auto-increment fields?
- Using Count to find the number of occurrences
- Is there any reason to worry about the column order in a table?
- MySQL Incorrect datetime value: ‘0000-00-00 00:00:00’
- Checking a table for time overlap?
- How to change MySQL table names in Linux server to be case insensitive?
- MySQL command line formatting with UTF8
- MYSQL select DISTINCT values in two columns
- MySQL UPDATE and SELECT in one pass
- Use promise to process MySQL return value in node.js
- where does MySQL store database files?
- How can I achieve initcap functionality in MySQL?
- MySQL: How to retrieve a random row or multiple random rows?
- How to Get True Size of MySQL Database?
- MySQL vs. JSON – Why? [closed]
- How to kill MySQL connections
- Find method to store an IP in MySQL for better performance
- OSX ld: library not found for -lssl
- Ruby on Rails – cannot load such file — mysql2/2.2/mysql2 (LoadError)
- How to solve MySQL max_user_connections error
- MySQL: Find Missing Dates Between a Date Range