Blog This!   Lee Geistlinger's Web Log
Blog Home
Blog Archives
LittleGhost Home

E-mail: geistlinger AT gmail.com

Loading
Pic 'O the Day
Top 10 Lists
Everyone loves lists
Reviews
Books, Movies and so on
Blogroll
Feed Me!

XML Feed

Feeds I Read

My Online Aggregator

Theme
• Default
• Spring
• Summer
• Autumn
• Winter
• Black & White
• Gray & White
• MT-ish
• Classic
Listening To...
Evidence of Efforts

This page is powered by Blogger. Isn't yours?

Valid CSS!

[Valid RSS]

Recent Posts
 Friday, April 15, 2005
mySQL Gotchas

As I mentioned in my previous post, I've upgraded to mySQL 4.1.11 from 3.23.58.

Great.

However, there were a couple of surprises I've run across in the testing of that change that - to me - shouldn't have been a surprise: It should have been very clearly stated up front in the changeover docs from mySQL.


The mySQL documentation says the following about subqueries (i.e. subselects):

A subquery is a SELECT statement inside another statement.

Starting with MySQL 4.1, all subquery forms and operations that the SQL standard requires are supported, as well as a few features that are MySQL-specific.

-- mySQL documentation; subqueries page

Sounds great, doesn't it? ALL subquery form and operations that the SQL standard requires are supported....

But you scroll to the bottom of the same page (before the user comments), and you see this limitation: "One restriction is that currently you cannot modify a table and select from the same table in a subquery. This applies to statements such as DELETE, INSERT, REPLACE, and UPDATE."

In other words, for same table subqueries, all you can do is SELECT. I.e. one of five possible statements, or only 20%. What a letdown. This limits the functionality of the subquery tremendously.

If they had said this up front, it wouldn't have been that big a deal. Underpromise, overdeliver.

Oh well. Still better than was preceded it...

- Posted by Lee at 6:34 PM Permalink #
^Top | Top Ten Home | Blog This! Home | Blog This! Archives