to_char(release_date,'yyyy-mm-dd HH:mm')
在kingbase数据库中通过上述代码转换时间并不准确,kingbase数据库不支持此格式,支持格式详见下一行。
# hh24:24小时展示 mi:分 ss:秒
to_char(release_date,'yyyy-mm-dd hh24:mi:ss')
取前一条记录,如果有分组,需要注意分组顺序
where rownum<=1 #前1条记录
从0开始,取五条记录
limit 5 offset 0 #行数最大值、偏移量
kingbase报错:
com.kingbase8.util.KSQLException: The authentication type 10 is not supported. Check that you have configured the sys_hba.conf file to include the client’s IP address or subnet, and that it is using an authentication scheme supported by the driver.
原因:升级kingbase后,需要将对应的驱动版本也进行升级
解决:删除原先引用的旧版本依赖,下载对应的新的版本依赖,重新引入jar包
换成新版本,客户端连接可能也需要安装对应版本。