Convert SQL Server to MySQL

A free online converter that translates SQL Server queries into MySQL. Paste your SQL, press Translate, and Query Studio rewrites the syntax that differs between the two databases — instantly, with no login and nothing stored.

Open in the editor →All Query Studio tools

SQL ServerMySQL example

Here is a real SQL Server query and the MySQL output Query Studio produces:

SQL Server input
SELECT TOP 10 u.id, u.name, COUNT(o.id) AS orders
FROM users u
LEFT JOIN orders o ON o.user_id = u.id
WHERE u.created_at > '2024-01-01' AND u.active = 1
GROUP BY u.id, u.name
HAVING COUNT(o.id) > 3
ORDER BY orders DESC;
MySQL output
SELECT
  u.id,
  u.name,
  COUNT(o.id) AS orders
FROM
  users u
  LEFT JOIN orders o ON o.user_id = u.id
WHERE
  u.created_at > '2024-01-01'
  AND u.active = 1
GROUP BY
  u.id,
  u.name
HAVING
  COUNT(o.id) > 3
ORDER BY
  orders DESC
LIMIT
  10

What changes from SQL Server to MySQL

  • Identifier quoting is rewritten from bracketed [identifiers] to backtick `identifiers`.
  • Row limiting is converted from SQL Server's TOP n to MySQL's LIMIT n, including any OFFSET for pagination.
  • Null-handling functions such as ISNULL() are mapped to IFNULL().
  • Current-timestamp functions like GETDATE() become NOW() / CURRENT_TIMESTAMP.
  • The result is re-indented and keyword-cased in MySQL style so it's ready to paste and run.

How to convert SQL Server to MySQL

  1. Open the Query Studio editor and choose SQL Server as the “From” dialect.
  2. Choose MySQL as the “To” dialect.
  3. Paste your SQL Server query and press Translate — copy the MySQL result.

Try it with your own query

The editor is preloaded with SQL ServerMySQL. You can also explain, format, validate and analyze the result.

Convert SQL Server to MySQL now →

SQL Server to MySQL FAQ

Is this SQL Server to MySQL converter free?

Yes — it's completely free with no account, no sign-up and no usage limits. Your query is processed to return the result and never stored.

Is the SQL Server to MySQL conversion accurate?

Query Studio rewrites syntax deterministically using real SQL parsers, so it gives the same result every time. It handles the common differences automatically; always review complex, vendor-specific queries before running them in production.

Can I convert MySQL back to SQL Server?

Yes. Use the MySQL to SQL Server converter, or press the Swap (⇄) button inside the editor to flip the direction instantly.

Other conversions

MySQL to SQL ServerMySQL to PostgreSQLPostgreSQL to MySQLSQL Server to PostgreSQLPostgreSQL to SQL ServerMySQL to Google BigQueryPostgreSQL to Snowflake