0

Its straight forward. I have no multiple tables.

How can I get the following SQL to work?

"UPDATE table SET (...) WHERE (...) LIMIT 2 ORDER BY something"

Sarchophagi
  • 377
  • 2
  • 5
  • 20
  • Please check documentation first before you are writing a query you are not sure how to write: http://dev.mysql.com/doc/refman/5.5/en/update.html – zerkms Jul 19 '14 at 21:53
  • what's the error msg you're getting? – Leo Jul 19 '14 at 22:03

1 Answers1

3

The keywords have to be in the correct order. Put limit to the end

UPDATE table 
SET (...) 
WHERE (...)  
ORDER BY something
LIMIT 2
juergen d
  • 201,996
  • 37
  • 293
  • 362