Transitions from SQL Server to MySQL

Source: Internet
Author: User

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 ...)
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.