MS SQL Server2000 Convert to MySQL

Source: Internet
Author: User
Tags date1 getdate uuid

Proceed as planned today to convert the background database from Ms SQL Server2000 to MySQL5.1.3. The purpose is to facilitate the release of beta versions of the software.

1. Drive: Mysql-connector-odbc-5.1.11-win32.msi. Test win7*64, XP passed.

2. mysql_5.1.3 free installation version.

3. Mss2sql Tool software transforms the SQLSERVER2000 table structure. Altogether 43 tables were converted.

4. The stored procedure in MSSQLServer2000 is converted to MySQL.

To-do

  

5. Differences in SQL functions

(1) SELECT * from A where convert (nvarchar (ten), tmakedate,121)>= ' 2015-05-08 '

-SELECT * from A WHERE date_format (tmakedate, '%y-%m-%d ')>= ' 2015-05-08 '

(2) SELECT * from A where isnull(Cmaker, ') <> "

SELECT * from Awhere ifnull(Cauditman, ') <> '

(3) Select newid ()

->select UUID()

Select getdate ()

->select Now ()

(4) Update a set a. field 1=b. field 2 from table A A, table b b where a.mid= ' 1 '

->update Table A, table b b set a. field 1=b. Field 2 where a.mid= ' 1 '

(5) Select Top Ten * from A

-select * from A LIMIT

(6) Select convert (nvarchar), getdate (), 121) as Date1, convert (nvarchar (+),getdate ()-2, 121) as Date2

->select Date_format (now (), '%y-%m-%d ') as Date1, Date_format (date_sub (Today (), INTERVAL 2 day), '%y-%m-%d ') As Date2

(7) INSERT into a (mid,itype) select NEWID (), 1 where NOT EXISTS (select 1 from A where itype=1)

->insert into a (MID, IType) SELECT UUID (), 1 from DUAL where not EXISTS (SELECT 1 from A where itype= 1)

Dual Virtual tables

6. Set MySQL to UTF8 encoding

To modify the My.ini configuration file, refer to:http://blog.csdn.net/red4711/article/details/6007248

7. Anonymous blocks are not supported in MySQL, which means that the procedural statement if,then must be executed in the stored procedure.

MS SQL Server2000 converted to MySQL

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.