`

Mysql Oracle 迁移

阅读更多
数据库迁移时最大的的问题是sql语句的不兼容问题,sql语句的不兼容又主要是函数的不兼容,所以做一些需要数据库兼容的系统,在写sql语句时尽量使用通用的函数、避免使用某一数据库特有的函数。这是几个比较常见的!抛砖引玉,欢迎大家补充!

oracle写法                      mysql写法                         兼容写法   
  
    decode              case when  then when end     case when  then when end   
  
nvl(expr1,expr2)        IFNULL(expr1,expr2)          coalesce(expr1,expr2 [ ,...n ] )   
  
   to_number                    conv                             尚未找到   
  
    to_date                     date_format                       尚未找到  
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics