随笔分类 -  gp.函数

摘要:功能:和oracle的同名函数一致,当只有两个参数时相当于oracle的nvl。 用例: select coalesce(max(id),0)+1 from tagcnt 说明: 以上是缺乏sequence时动态生成新id的SQL语句 阅读全文
posted @ 2022-02-15 04:00 不朽的飞翔 阅读(821) 评论(0) 推荐(0)
摘要:create table tagcnt( id int, cnt int, create_time timestamp default now(), primary key(id) ) 以上的函数now() 即相当于oracle里的sysdate。 END 阅读全文
posted @ 2022-02-15 03:54 不朽的飞翔 阅读(494) 评论(0) 推荐(0)