Differences between MySQL and SQL Server

sestocker picture sestocker · Aug 14, 2008 · Viewed 329.1k times · Source

I'm an ASP.NET developer who has used Microsoft SQL Server for all my database needs (both at work and for personal projects).

I am considering trying out the LAMP stack for some of my personal projects.

What are some of the main differences between MySQL and SQL Server? Is using stored procedures a common practice in MySQL?

Any advice or resources you'd recommend to help me with the switch?

To those who have experience with both, are there any missing features from MySQL?

Answer

Jeff Atwood picture Jeff Atwood · Aug 14, 2008

One thing you have to watch out for is the fairly severe differences in the way SQL Server and MySQL implement the SQL syntax.

Here's a nice Comparison of Different SQL Implementations.

For example, take a look at the top-n section. In MySQL:

SELECT age
FROM person
ORDER BY age ASC
LIMIT 1 OFFSET 2

In SQL Server (T-SQL):

SELECT TOP 3 WITH TIES *
FROM person
ORDER BY age ASC