Because Microsoft modified the SQL Server billing policy (before the CPU charge, now is the CPU core charge), causing the company to spend more than $1 million a year, the boss Aniu think this is not worth, decided to turn to open source free MySQL, although the use of the fee version, But the cost will be much less. As a group of. NET programmers, the company began a hard-working migration.
Here are some of the issues and solutions that I recorded in the migration effort (occasional updates).
Because a lot of T-SQL syntax is not available in MySQL, the SQL modification is a big job: convert (VARCHAR (), date, 112) is replaced with date_format (date, '%y%m%d '); Delete Temptablefrom temptableas t_table Replace with delete t_tablefrom temptableas t_table row_number () function is not available in MySQL and can be replaced as follows:
@RowNum: = @RowNum + 1 as RowNum
(SELECT @RowNum: = 0) As Myrows
MySQL concatenation string cannot use "+", should use Concat ("str1", "str2") Date_format function: date_format (date, format)%Y Four-bit year%Y two-bit year (to be continued ...)