mysql8 转达梦 兼容处理 REGEXP

Love The Way You Lie 2024-03-23 14:56 111阅读 0赞

1.REGEXP

org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [select max(group_id)group_id from t_xx where group_id REGEXP ‘^[\d]+$’]; nested exception is dm.jdbc.driver.DMException: 第 1 行, 第 71 列[REGEXP]附近出现错误:

语法分析出错

改为

select max(group_id) group_id from t_xx where REGEXP_LIKE(group_id, ‘^[\d]+$’)

发表评论

表情:
评论列表 (有 0 条评论,111人围观)

还没有评论,来说两句吧...

相关阅读

    相关 RegExp

    `RegExp` 构造函数创建了一个正则表达式对象,用于将文本与一个模式匹配。 有关正则表达式的介绍,请阅读 [JavaScript指南][JavaScript]中的[正则表