SQLFormatter
FormatterConvertPricingDocsGet Pro
SQL Converter · MySQLT-SQL

Convert MySQL SQL to T-SQL

MySQL to SQL Server swaps LIMIT for TOP, `backticks` for [brackets], IFNULL for ISNULL and NOW() for GETDATE(). A mechanical formatter only re-indents — it won’t rewrite dialect-specific syntax. The AI converter in the app translates the query and the table below shows exactly what changes.

MySQL — source
MySQL
SELECT id, name,
       IFNULL(score, 0) AS score
FROM players
WHERE updated_at > NOW() - INTERVAL 1 DAY
ORDER BY score DESC
LIMIT 10;
T-SQL — converted
T-SQL
SELECT TOP 10 id, name,
       ISNULL(score, 0) AS score
FROM players
WHERE updated_at > DATEADD(DAY, -1, GETDATE())
ORDER BY score DESC;
Convert your own query

What changes from MySQL to T-SQL

MySQLT-SQLWhy
LIMIT 10SELECT TOP 10T-SQL row limiting is a leading TOP, not a trailing LIMIT.
`identifier`[identifier]Backtick quoting becomes bracket quoting.
IFNULL / NOW()ISNULL / GETDATE()Null-coalesce and current-time functions differ.
NOW() - INTERVAL 1 DAYDATEADD(DAY, -1, GETDATE())Date math uses DATEADD in T-SQL.

Other SQL conversions

MySQLPostgreSQLPostgreSQLT-SQLMySQLSnowflakeMySQLBigQueryMySQLSQLiteAll conversions →