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

6 Comments to "Three wishes for a new year"

  1. Justin Swanhart wrote:

    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.

  2. Justin Swanhart wrote:

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

  3. Yaron wrote:

    Amen to that! :)

  4. shlomi wrote:

    @Justin: thanks for the reference!

  5. shlomi wrote:

    @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.

  6. MySQL foreach() | code.openark.org wrote:

    [...] does not support ORDER BY & LIMIT in multi-table UPDATE and DELETE statements (as noted last year). So we [...]

Leave Your Comment

 
Powered by Wordpress and MySQL. Theme by openark.org