<p>I'm an <a href="http://en.wikipedia.org/wiki/ASP.NET" rel="noreferrer">ASP.NET</a> developer who has used <code>Microsoft SQL Server</code> for all my database needs (both at work and for personal projects). </p>

<p>I am considering trying out the <a href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29" rel="noreferrer">LAMP</a> stack for some of my personal projects. </p>

<p>What are some of the main differences between <code>MySQL</code> and <code>SQL Server</code>? Is using <a href="http://en.wikipedia.org/wiki/Stored_procedure" rel="noreferrer">stored procedures</a> a common practice in <code>MySQL</code>? </p>

<p>Any advice or resources you'd recommend to help me with the switch? </p>

<p>To those who have experience with both, are there any missing features from <code>MySQL</code>?</p>

[{'answer_id': 10623, 'author': 'Jeff Atwood', 'author_id': 1, 'author_profile': 'https://Stackoverflow.com/users/1', 'pm_score': 8, 'selected': True, 'text': '<p>One thing you have to watch out for is the fairly severe differences in the way SQL&nbsp;Server and MySQL implement the SQL syntax.</p>\n\n<p>Here\'s a nice <a href="http://troels.arvin.dk/db/rdbms/" rel="noreferrer">Comparison of Different SQL Implementations</a>.</p>\n\n<p>For example, take a look at the top-n section. In MySQL:</p>\n\n<pre><code>SELECT age\nFROM person\nORDER BY age ASC\nLIMIT 1 OFFSET 2\n</code></pre>\n\n<p>In SQL&nbsp;Server (T-SQL):</p>\n\n<pre><code>SELECT TOP 3 WITH TIES *\nFROM person\nORDER BY age ASC\n</code></pre>\n'}, {'answer_id': 10628, 'author': 'Jon Limjap', 'author_id': 372, 'author_profile': 'https://Stackoverflow.com/users/372', 'pm_score': 3, 'selected': False, 'text': '<p>I think one of the major things to watch out for is that versions prior to MySQL 5.0 did not have views, triggers, and stored procedures.</p>\n\n<p>More of this is explained in the <a href="http://dev.mysql.com/downloads/mysql/5.0.html#downloads" rel="nofollow noreferrer">MySQL 5.0 Download page</a>.</p>\n'}, {'answer_id': 10900, 'author': 'dlinsin', 'author_id': 198, 'author_profile': 'https://Stackoverflow.com/users/198', 'pm_score': 2, 'selected': False, 'text': '<blockquote>\n  <p>Anyone have any good experience with a\n  "port" of a database from SQL Server\n  to MySQL?</p>\n</blockquote>\n\n<p>This should be fairly painful! I switched versions of MySQL from 4.x to 5.x and various statements wouldn\'t work anymore as they used to. The query analyzer was "improved" so statements which previously were tuned for performance would not work anymore as expected. </p>\n\n<p>The lesson learned from working with a 500GB MySQL database: It\'s a subtle topic and anything else but trivial!</p>\n'}, {'answer_id': 18320, 'author': 'Jon Galloway', 'author_id': 5, 'author_profile': 'https://Stackoverflow.com/users/5', 'pm_score': 4, 'selected': False, 'text': '<p>MySQL is more likely to have database corruption issues, and it doesn\'t fix them automatically when they happen. I\'ve worked with MSSQL since version 6.5 and don\'t remember a database corruption issue taking the database offline. The few times I\'ve worked with MySQL in a production environment, a database corruption issue took the entire database offline until we ran the magic "please fix my corrupted index" thing from the commandline.</p>\n\n<p>MSSQL\'s transaction and journaling system, in my experience, handles just about anything - including a power cycle or hardware failure - without database corruption, and if something gets messed up it fixes it automatically.</p>\n\n<p>This has been my experience, and I\'d be happy to hear that this has been fixed or we were doing something wrong.</p>\n\n<p><a href="http://dev.mysql.com/doc/refman/6.0/en/corrupted-myisam-tables.html" rel="noreferrer">http://dev.mysql.com/doc/refman/6.0/en/corrupted-myisam-tables.html</a></p>\n\n<p><a href="http://www.google.com/search?q=site%3Abugs.mysql.com+index+corruption" rel="noreferrer">http://www.google.com/search?q=site%3Abugs.mysql.com+index+corruption</a></p>\n'}, {'answer_id': 51244, 'author': 'Abdu', 'author_id': 5232, 'author_profile': 'https://Stackoverflow.com/users/5232', 'pm_score': 3, 'selected': False, 'text': "<p>Frankly, I can't find a single reason to use MySQL rather than MSSQL. The issue before used to be cost but SQL Server 2005 Express is free and there are lots of web hosting companies which offer full hosting with sql server for less than $5.00 a month.</p>\n\n<p>MSSQL is easier to use and has many features which do not exist in MySQL. </p>\n"}, {'answer_id': 51254, 'author': 'Cebjyre', 'author_id': 1612, 'author_profile': 'https://Stackoverflow.com/users/1612', 'pm_score': 2, 'selected': False, 'text': '<p>@abdu</p>\n\n<p>The main thing I\'ve found that MySQL has over MSSQL is timezone support - the ability to nicely change between timezones, respecting daylight savings is fantastic.</p>\n\n<p>Compare this:</p>\n\n<pre><code>mysql&gt; SELECT CONVERT_TZ(\'2008-04-01 12:00:00\', \'UTC\', \'America/Los_Angeles\');\n+-----------------------------------------------------------------+\n| CONVERT_TZ(\'2008-04-01 12:00:00\', \'UTC\', \'America/Los_Angeles\') |\n+-----------------------------------------------------------------+\n| 2008-04-01 05:00:00                                             |\n+-----------------------------------------------------------------+\n</code></pre>\n\n<p>to the contortions involved at <a href="https://stackoverflow.com/questions/24797/effectively-converting-dates-between-utc-and-local-ie-pst-time-in-sql-2005#25073">this answer</a>.</p>\n\n<p>As for the \'easier to use\' comment, I would say that the point is that they are different, and if you know one, there will be an overhead in learning the other.</p>\n'}, {'answer_id': 53150, 'author': 'Abdu', 'author_id': 5232, 'author_profile': 'https://Stackoverflow.com/users/5232', 'pm_score': 2, 'selected': False, 'text': "<p>@Cebjyre. The IDE whether Enterprise Manager or Management Studio is better than anything I have seen so far for MySQL. I say 'easier to use' because I can do many things in MSSQL where MySQL has no counterparts. In MySQL I have no idea how to tune the queries by simply looking at the query plan or looking at the statistics. The index tuning wizard in MSSQL takes most of the guess work on what indexes are missing or misplaced. </p>\n\n<p>One shortcoming of MySQL is there's no max size for a database. The database would just increase in size till it fills up the disk. Imagine if this disk is sharing databases with other users and suddenly all of their queries are failing because their databases can't grow. I have reported this issue to MySQL long time ago. I don't think it's fixed yet.</p>\n"}, {'answer_id': 312893, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': "<p>Spending some time working with MySQL from the MSSQL to MySQL syntax POV I kept finding myself limited in what I could do.</p>\n\n<p>There are bizzare limits on updating a table while refrencing the same table during an update.</p>\n\n<p>Additionally UPDATE FROM does not work and last time I checked they don't support the Oracle MERGE INTO syntax either. This was a show stopper for me and I stopped thinking I would get anywhere with MySQL after that.</p>\n"}, {'answer_id': 312962, 'author': 'dkretz', 'author_id': 31641, 'author_profile': 'https://Stackoverflow.com/users/31641', 'pm_score': 3, 'selected': False, 'text': '<p>Everything in MySQL seems to be done closer to the metal than in MSSQL, And the documentation treats it that way. Especially for optimization, you\'ll need to understand how indexes, system configuration, and the optimizer interact under various circumstances.</p>\n\n<p>The "optimizer" is more a parser. In MSSQL your query plan is often a surprise (usually good, sometimes not). In MySQL, it pretty much does what you asked it to do, the way you expected it to. Which means you yourself need to have a deep understanding of the various ways it might be done.</p>\n\n<p>Not built around a good TRANSACTION model (default MyISAM engine).</p>\n\n<p>File-system setup is your problem.</p>\n\n<p>All the database configuration is your problem - especially various cache sizes.</p>\n\n<p>Sometimes it seems best to think of it as an ad-hoc, glorified isam. Codd and Date don\'t carry much weight here. They would say it with no embarrassment.</p>\n'}, {'answer_id': 2401837, 'author': 'prince', 'author_id': 288831, 'author_profile': 'https://Stackoverflow.com/users/288831', 'pm_score': 3, 'selected': False, 'text': "<p>Both are DBMS's Product Sql server is an commercial application while MySql is an opensouces application.Both the product include similar feature,however sql server should be used for an enterprise solution ,while mysql might suit a smaller implementation.if you need feature like recovery,replication,granalar security and significant,you need sql server</p>\n\n<p>MySql takes up less spaces on disk, and uses less memory and cpu than does sql server</p>\n"}, {'answer_id': 3615943, 'author': 'Remy', 'author_id': 375192, 'author_profile': 'https://Stackoverflow.com/users/375192', 'pm_score': 6, 'selected': False, 'text': "<p>Lots of comments here sound more like religious arguments than real life statements. \nI've worked for years with both MySQL and MSSQL and both are good products. \nI would choose MySQL mainly based on the environment that you are working on. Most open source projects use MySQL, so if you go into that direction MySQL is your choice. If you develop something with .Net I would choose MSSQL, not because it's much better, but just cause that is what most people use. \nI'm actually currently on a Project that uses ASP.NET with MySQL and C#. It works perfectly fine.</p>\n"}, {'answer_id': 12865681, 'author': 'ely', 'author_id': 567620, 'author_profile': 'https://Stackoverflow.com/users/567620', 'pm_score': 5, 'selected': False, 'text': '<p>I can\'t believe that no one mentioned that MySQL doesn\'t support Common Table Expressions (CTE) / "with" statements. It\'s a pretty annoying difference.</p>\n'}]
['https://Stackoverflow.com/questions/10616', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/285/']