Ask the Expert

1064 error on query with subquery

I'm using MySQL version 4.0.18-nt and php-myadmin with version 4.3.4. I have a query with a subquery:
select num from request
where num in (select max(num) from request group by num2)
I get the #1064 error ("You have an error in your SQL syntax"), and I don't know why. According to the documentation, my syntax is correct. Any thoughts?

Requires Free Membership to View

Subqueries are only available from MySQL 4.1 and higher. You will need to upgrade.

This was first published in August 2004

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: