-> 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.字段1=b.字段2 from 表A a, 表B b where a.MID=‘1‘
->update 表A a, 表B b set a.字段1=b.字段2 where a.MID=‘1‘
(5)select top 10 * from A
-> select * from A LIMIT 10
(6)select convert(nvarchar(10),getdate(),121) as Date1, convert(nvarchar(10), getdate()-2 ,121) as Date2
->SELECT DATE_FORMAT(NOW(),‘%Y-%m-%d‘) as Date1, DATE_FORMAT( DATE_SUB(NOW(), 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虚拟表
6. 设置MYSQL为UTF8编码
修改my.ini配置文件,参考: http://blog.csdn.net/red4711/article/details/6007248
7. MYSQL中不支持匿名块,也就是说过程性语句IF,THEN必须放在存储过程中执行。
MS SQL Server2000转换成MySQL
标签:
查看更多关于MS SQL Server2000转换成MySQL的详细内容...