系统:windows 10
安装教程:https://eco.dameng.com/document/dm/zh-cn/pm/install-uninstall.html
数据守备搭建教程:https://eco.dameng.com/document/dm/zh-cn/pm/data-guard-construction.html
数据初始化:
完成安装后,完成数据库初始化,其中不勾选字符串比较大小写,勾选VARCHAR类型以字符为单位。
数据迁移:
代码适配:
数据库兼容性问题:
a) 需要在数据库链接的url上添加参数:
compatible_mode=mysql&clobAsString=true
b) 需要在达梦数据库设置:
sp_set_para_value(1,'ENABLE_BLOB_CMP_FLAG',1);
sp_set_para_value(2,'COMPATIBLE_MODE',4);
用于解决long text的比较,clob作为字符串的读取,和其他数据兼容性的问题。
达梦数据库不存在str_to_date
函数,需使用date_format
函数代替;to_date
函数也最好使用date_format
代替。
达梦数据库不存在format
函数,需使用to_char
函数代替。例如:
format(0+cast(ifnull(sum(convert(money, decimal(18,6))),0) as char),2)
可替换为
to_char(ifnull(sum(cast(money as decimal(18, 6))), 0),'999G999G999G999G999D99')
达梦数据库不存在group_concat
函数,需使用wm_concat
函数代替。
达梦数据库无法识别语句中的`
, 需将所有该字符去掉。
springboot pagehelper dialect
无法自动识别达梦数据驱动, 需要在配置文件中指定具体的参数:
pagehelper:
helperDialect: oracle
reasonable: true
supportMethodsArguments: true
params: count=countSql
达梦数据库不存在signed
类型,需使用integer
代替。
达梦数据库cast as char
无法使用,需使用cast as varchar
代替。
达梦数据库语句中的字符串包含单引号'
时,正确的escape方案由 \'
改为 ' '
。
达梦数据库使用if
函数,如果出现某一组数据为null
的情况会报错,需使用nullif
代替。
达梦数据库使用interval
函数时,需要将interval
后面的数字用单引号引用。
达梦数据库无法使用order by assessment+0
的格式对字符串的数字部分排序,需将非数字部分替换方可按照数字顺序排序:order by (REPLACE(assessment,'M','')+0)
。
达梦数据库仅可以使用 insert into values
不可以使用 insert into value
。
文章
阅读量
获赞