I need to have MySQL query like this one:
UPDATE table_name SET 1 = 1 WHERE ID = 257
But I got the syntax error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 = 1 WHERE ID = 257' at li开发者_StackOverflow社区ne 3
Need to perform an UPDATE query without updating anything. What are the solutions?
UPDATE `table_name`
SET `ID` = `ID`
WHERE `ID` = 257
How about:
UPDATE table_name
SET
ID = 257
WHERE
ID = 257
Would that work for you?
精彩评论