Front page | perl.beginners |
Postings from June 2003
Re: SQL vs MySql?
Thread Previous
|
Thread Next
From:
Rob Dixon
Date:
June 10, 2003 06:01
Subject:
Re: SQL vs MySql?
Message ID:
20030610130132.50704.qmail@onion.perl.org
Josh Berkus wrote:
> Rob, Snag,
>
> > MySQL will accept nearly all of the same standard syntax as SQL Server,
> > but if the database is running under SQL Server then you have no choice
> > but to use a SQL Server database driver to access it. Copy all the data
> > over to a MySQL database and you can then use MySQL in the same way.
>
> FWIW, there *will* definitely be syntactical differences in SQL between the
> two databases. MySQL and MSSQL support a different portion of the SQL
> standard, and each has proprietary extensions to SQL that are very different.
Sure. That's pretty much what I said:
> MySQL will accept nearly all of the same /standard/ syntax as SQL Server.
Except that I believe the similarities are more numerous, more useful and
more appropriate to this non-SQL list that the differences. The majority of
SQL code is something like
SELECT title FROM hits WHERE artist LIKE 'Elvis%';
or
UPDATE personnel SET salary = salary * 1.06;
which all databases that I have ever come across are happy with.
> For example:
>
> MySQL does not support UPDATE table1 ... FROM table2 last I checked;
That is simply an alternative syntax for
UPDATE table1, table2 ...
> MSSQL does not support LIMIT and OFFSET;
Nor should it. These are PostgreSQL nasties which MySQL has adopted
so it can be seen to be a valid alternative database.
> MSSQL has Views and Procedures;
MySQL supports both of these. And triggers.
> An excellent resource for these differences (though a bit out of date, esp.
> regarding both InnoDB and Postgresql) is O'Reilly's "SQL in a Nutshell".
> This is *not* an introductory book and has some other problems, but does do a
> good job of comparing MySQL, MSSQL, PostgreSQL, and Oracle on a
> command-by-commmand basis.
I would advocate learning ANSI SQL and trying to forget about what
nice things can be done if you happen to be working on a given
database engine. There is a very nice tutorial at
http://www.w3schools.com/sql/
Cheers,
Rob
Thread Previous
|
Thread Next