visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: SQL and MySQL difference.


By: scientist U.S.A.  Date: 25/04/2003 00:00:00  English  Points: 100 Status: Answered
Quality : Excellent
Hello Experts,
From the title it seems like not a hard question and it really isn't.
I am not joking either.
What are the basic differences there exist between SQL and MySQL?
Another way what I am trying to know is, If I know SQL, what are the things I should know to do differently when I use MySQL?

A follow-up question to this is: Does MySQL work good enough with ColdFusion? I know that it works best with PHP but if I were to use it with ColdFusion will it give me results which I can rely on for a long time to come?

If I am not clear please forgive me and feel free to ask me any question or clarification you may need.

Thank you in advance for your help!!!

--scientist.
By: VGR Date: 25/04/2003 15:26:00 English  Type : Answer
1) this is explained here

<A HREF="http://www.mysql.com/doc/en/Compatibility.html">http://www.mysql.com/doc/en/Compatibility.html</a>

From personal experience, MySql is more SQL-92 compliant than M$-Sql-Server or DB2 or ORACLE, for example.
Beware of SQL-99, it does exist too

2) having said the same to me when starting using MySql, I can confidently answer : "nothing , just that some features may not be supported yet (stored procedures, triggers etc) or do not need to exist (views, namespaces, rowID, CUBE...)"

3) follow-up : yes, ColdFusion stays cool (:D) even with MySql

4) special bonus : You should consider PHP vs CF. CF is very special and somewhat uses proprietary servers.
By: VGR Date: 25/04/2003 15:32:00 English  Type : Comment
examples :

Use of TRIM() to trim substrings. SQL-99 supports removal of single characters only.

MySQL Server understands the || and && operators to mean logical OR and AND, as in the C programming language. In MySQL Server, || and OR are synonyms, as are && and AND. Because of this nice syntax, MySQL Server doesn't support the standard SQL-99 || operator for string concatenation; use CONCAT() instead. Because CONCAT() takes any number of arguments, it's easy to convert use of the || operator to MySQL Server.

To make it easier for users who come from other SQL environments, MySQL Server supports aliases for many functions. For example, all string functions support both standard SQL syntax and ODBC syntax.

1.8.4 MySQL Differences Compared To SQL-92
We try to make MySQL Server follow the ANSI SQL standard (SQL-92/SQL-99) and the ODBC SQL standard, but in some cases MySQL Server does things differently:

For VARCHAR columns, trailing spaces are removed when the value is stored. See section 1.8.5 Known Errors and Design Deficiencies in MySQL.

In some cases, CHAR columns are silently changed to VARCHAR columns. See section 6.5.3.1 Silent Column Specification Changes.

Privileges for a table are not automatically revoked when you delete a table. You must explicitly issue a REVOKE to revoke privileges for a table. See section 4.3.1 GRANT and REVOKE Syntax.

NULL AND FALSE will evaluate to NULL and not to FALSE. This is because we don't think it's good to have to evaluate a lot of extra conditions in this case.
By: JakobA Date: 27/04/2003 01:09:00 English  Type : Comment
mysql has no support for subselects.
mysql has some different reserved words.
mysql has no (or only partial) support for stored procedures.

best JakobA
By: VGR Date: 27/04/2003 01:33:00 English  Type : Comment
mysql is fast and robust
By: JakobA Date: 27/04/2003 01:46:00 English  Type : Comment
VGR >> the addition of || and && as logical operators in mysql is NOT something I admire about it. Especially as || already exist as an operator in sql.

Commercial applications have the excuse that they need to profile themselves so they can write ads telling how their deviations from the competitor makes them 'better'.

for an open-source project there is NO excuse for such deviations. Only project managers who chose to cave in, rather than reject it when a code contributor comes peddling his hobby horse.

Actually mysql is not the worst case in this. php excels with two complete (and incompatible) syntaxes for if-statements. and 3 different syntaxes for strings.

best JakobA
By: VGR Date: 27/04/2003 02:41:00 English  Type : Comment
agree for ugly&stupid || and && ; this must be to please the C-only people around here.

Note that it's NOT a deviation, but an alternative (alias). As long as standard SQL92 is supported... The DB is compliant, aliases notwithstanding.

Forme, the worst case for non-compliance with standards is MS-Sql-Server, and then DB2, and then Oracle. Not MySql.

I totally disagree on PHP IFs and its supposedly three different syntaxes for strings, or please explain.
By: JakobA Date: 27/04/2003 03:07:00 English  Type : Comment
if ( condition ) { // C-like syntax
statements;
} else {
statements;
}

if ( condition ) : // basic-like syntax
statements;
elseif :
statements;
else :
statements;
endif

now try writing a c-like if statement in a statement block before the else of a basic-like if statement.

strings: <A HREF="http://dk.php.net/manual/en/language.types.string.php">http://dk.php.net/manual/en/language.types.string.php</a>
$str = 'cccccccc' // '-chars surrounding. no variable insertion. few chars escapable
$str = "ccc$var cc" // "-chars surrounding. simple variable insertion. all chars escapable
$str = <<<EOD
Example of string
spanning multiple lines
using heredoc syntax.
EOD; // heredoc syntax. mostly like "-surrounded

KISS please.
By: VGR Date: 27/04/2003 03:16:00 English  Type : Comment
nothing to do with syntax about strings.
Just two different behaviours (parsing/substitution or not) depending on the quotes used...
Pascal also has single and double quotes (even if it's for chars and strings = array of chars-compatible) and nobody wcomplains about "double strings syntax"

ONLY BASIC has a single quote (double) for strings ;-)

Do you prefer BASIC ? :D

and the echo <<<EOS
is the most handy thing I've ever seen on strings

so KISS
By: scientist Date: 01/05/2003 11:47:00 English  Type : Comment
Thanks everyone for insightful comments to question. I will grade this answer as soon as possible. I am very busy right now but hopefully soon I will grade this.

Once again thank you very much for your interest and time.

--scientist.
By: scientist Date: 06/05/2003 12:17:00 English  Type : Comment
I have come to decision that since VGR was the one who best explained the difference so the credits and points for this questions go to VGR.

Thanks for input and discussion.

I am choosing first comment from VGR as an answer.

Best regards,
--scientist.

Do register to be able to answer

EContact
browser fav
page generated in 359.180930 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page