MySQL Forums
Forum List  »  General

nested query doesn't work on 4.0.20
Posted by: Zhiliang Hu
Date: May 12, 2005 10:23AM

I am running MySQL 4.0.20.

Here is my query 1, which works:

mysql> select max(updated) from map_ref;
+--------------+
| max(updated) |
+--------------+
| 2005-05-12 |
+--------------+
1 row in set (0.02 sec)

However when I put it in a nested query it complains:

mysql> select updated from map_ref where updated = (select max(updated) from map_ref);
ERROR 1064: 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 'select max(updated) from map_ref)' at line 1

Any suggestion what could be the problem?

Zhiliang

Options: ReplyQuote


Subject
Written By
Posted
nested query doesn't work on 4.0.20
May 12, 2005 10:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.