MySQL subquery

Can someone tell me how to determine what version of MySQL we have? I get a syntax error trying to run a subquery, and found that they aren’t supported in version 3.x, but don’t know what version we have.

One way is to run the SQL query in PHPMyAdmin
select version( )
which returns
"4.0.20-log" for me.

Assume this would work from mysql monitor too, but haven’t checked that out.


Thanks for the quick answer, that does return 4.0 for me also. So I don’t understand why basic subqueries won’t work. Any ideas?

Nevermind, just found out that subqueries require 4.1 or higher. Somewhere else I read it was only in 3.x that they weren’t supported. Guess I have to wait for DH to get with it and upgrade!

According to Mysql Developer Zone under “Getting Started”, need 4.1.x to do subqueries…didn’t read beyond that…