Operating System - Linux
1828581 Members
2472 Online
109982 Solutions
New Discussion

MySQL is good, except for....

 
dan dobbs
Frequent Advisor

MySQL is good, except for....

MySQL is a good database for a lot of general purpose stuff. I have it back-ending my monitoring solution (Nagios) and my intranet server (PHP-Nuke). My only complaint is that it does not do subqueries [i.e. SELECT * FROM orders WHERE (SELECT snum WHERE cnum = 1001)]. That killed most of an afternoon for me until I doublechecked the manuals. :>)
Hey, that's not a spoon.
4 REPLIES 4
Michael Armbrecht
Frequent Advisor

Re: MySQL is good, except for....

Which is funny, because that is the #1 reason people usually have for not using MySQL...
Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic.
Jerome Henry
Honored Contributor

Re: MySQL is good, except for....

Can't you just... bypass the problem ?
I've been using Mysql for eons, along with MS SQL server (which uses subqueries), and when on Mysql, this problem never affected my queries.
Can't you do a sort of SELECT * FROM orders, snum FROM stuff, WHERE orders.sth=stuff=sthelse AND otherarg ?
Jerome
You can lean only on what resists you...
dan dobbs
Frequent Advisor

Re: MySQL is good, except for....

Sorry, folks, this was supposed to be a reply to someone else's question---don't know how it became a new topic. Please disregard.
Hey, that's not a spoon.
Hans van Zijst
Advisor

Re: MySQL is good, except for....

MySQL is quite nice for lots of general stuff indeed. As for subselects, MySQL doesn't support this. Yet. It's planned and it's already implemented in development version 4.1.

Most of the time, however, you can circumvent a subselect by formulating your query in a different way. Hints about this are on the MySQL-site and probably on lots of other places too.

If you really need subselects (and other SQL-stuff like transactions and views), you could take a look at PostgreSQL (http://www.postgresql.org). PostgreSQL is a lot bigger than MySQL however, and for a reason ;)

Kind regards,

Hans
l'apprenti sorcier