Good day,
There is a lot of confusion in your single post...
I've created and tested MySql scripts
MySQL has nothing to do with SQL Server or Azure SQL Database! It is totally different product from different company.
MySQL: own by Oracle Corporation; https://en.wikipedia.org/wiki/MySQL
SQL Server: own by Microsoft; https://en.wikipedia.org/wiki/Microsoft_SQL_Server
Note: There is a service of MySQL in the Azure which call Azure Database for MySQL
: https://azure.microsoft.com/en-us/services/mysql/
it works fine on localhost but when I try to connect to azure
Obviously two different product from two different companies use different leagues
MySQL uses SQL and SQL Server uses TSQL
Here's my code:
This code is not related to SQL Server or to MySQL. In first glance it looks like node.js code. Therefore, your best option is to ask the question in node.js forums or in MySQL forums