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