MySQL Forums
Forum List  »  General

you have an error ... or my biggest gripe with mysql
Posted by: Stephan Steiner
Date: September 20, 2006 07:34AM

Hi

I've used MySQL for quite a while now, usually for rather simple stuff. My biggest problem right from the getgo are the errors MySQL returns when you feed it a command that doesn't work.. I come from a programming background so I'm used to have an IDE and a compiler that tells me, you got an error at line X at this position, and the IDE usually flags the glaring errors before you even compile. In MySQL, all you ever get back is Error XYZ : 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 '....'
If you're lucky, it at least quotes the offending line, but more often than not, the line is at least cut off, and sometimes it's even a miss.

Then, late last year I had to do a project on MS SQL server. It took some getting used to via the little syntax differences, but then I also was forced to get into more complex stuff like functions, stored procedures, views and triggers - all the things that MySQL didn't even have up until version 5 (and where I'm still a bit puzzled as to which version exactly supports what.. but that's another matter). Either way, while the MS Tools for SQL Server still don't match up to a good IDE, at least they tell you a lot more about an error. E.g. if you try to write something into a table column but misspell the column name.. sql server tells you that there's no column with such a name in that particular table.
If you write an SP and make reference to a variable not declared, you'll be told so. If you declare a variable twice, you'll be told that your second variable declaration is ambigous since the variable has already been declared. If your insert clause contains more values than column names, sql server will tell you so as well, and I could go on and on. Bottom line is that unless you are near perfect at writing SQL statements, you'll run into the "you have an error" sooner rather than later and it would be extremely useful to have some more useful feedback from the database than "you have an error..".

I'm really looking forward to the day where I don't wish I could use MS SQL just because it tells me more than "no" when I make a mistake.

Options: ReplyQuote


Subject
Written By
Posted
you have an error ... or my biggest gripe with mysql
September 20, 2006 07:34AM


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.