Three wishes for a new year

September 9, 2010

It's a new year by Jewish calendar (and, incidently, today is the first day of the next 365 days). And what do I wish for in the following year?

  1. World peace
  2. Good health to all
  3. Support for ORDER BY & LIMIT in MySQL multi-table UPDATE and DELETE statements, This is sometimes a real show stopper!

Have a good year / next 12 months everyone!

tags:
posted in MySQL by shlomi

« | »

Follow comments via the RSS Feed | Leave a comment | Trackback URL

  • I have a user-variable abusing method for Multi-table delete + LIMIT. I think I've only tested it for deleting from one table, but where that table needs to be joined to other tables.

  • Oh, I forgot that I blogged about that before:
    http://swanhart.livejournal.com/120806.html

  • Amen to that! 🙂

  • @Justin: thanks for the reference!

  • @Justin,
    As another note: there is a problem with applying your solution, which does not (and cannot) use ORDER BY, since queries become replication-unsafe.
    Actually, it may not bee such a problem if you want to do complete query is smaller chunks, in which case the ORDER does not really matter, replication-wise. But I can still see it leading to issues if new rows are added which match the DELETE/UPDATE WHERE condition.

  • Pingback: MySQL foreach() | code.openark.org()

 
Powered by Wordpress and MySQL. Theme by openark.org