Attempting to run this against MySql should show you what syntax is incorrect; I see three lines that are not part of ANSI-SQL and it is up to you to find out what needs to be done.
TOP(10)
most likely can be replaced with
LIMIT
.
MySQL :: MySQL 8.0 Reference Manual :: 8.2.1.19 LIMIT Query Optimization[
^]
The
NOT EQUALS comparison is different in SQL than in programming languages. Microsoft added in the ability to use
!=
just as an added feature. They do support the ANSI standard for this as well.
SQL Comparison Operators (Equal, Not Equal, Less than, Grater than) - Tutlane[
^]
The last item I see is the
IsNull
function which does not have a direct replacement. What you should look at is the
Coalesce
expression, which will work in both SQL Server and MySQL. It is a more complicated operator
under the hood but is preferable once you understand the nuances.
5 Differences between COALESCE and ISNULL in SQL Server[
^]