你说你看不懂openGauss我都不信(百四十五)

67 阅读1分钟

#openGauss #入门 #安装 #数据库 #开源

知识来源:docs-opengauss.osinfra.cn/zh/

TIMESTAMPDIFF

  • TIMESTAMPDIFF(unit , timestamp_expr1, timestamp_expr2)

timestampdiff函数是计算两个日期时间之间(timestamp_expr2-timestamp_expr1)的差值,并以unit形式返回结果。timestamp_expr1,timestamp_expr2必须是一个timestamp、timestamptz、date类型的值表达式。unit表示的是两个日期差的单位。

说明:
该函数仅在openGauss兼容MY类型时(即dbcompatibility = 'B')有效,其他类型不支持该函数。 该函数仅在GUC参数dolphin.b_compatibility_mode为true/on时,才可正确兼容MySQL。

#openGauss #入门 #安装 #数据库 #开源

知识来源:docs-opengauss.osinfra.cn/zh/