postgre-sql
0x05
这个作者很懒,什么都没留下…
展开
-
PostgreSQL返回时间段之间每月最后一天
/* * Param One:开始时间 * Param Two:结束时间 * 功能 : 返回时间段之间的每月最后一天 */drop function if exists getmonths(text,text);create or replace function getmonths(text,text)returns setof int as $body$declare ...原创 2018-11-01 11:06:05 · 8436 阅读 · 0 评论 -
PostgreSQL 按照自定义顺序排序
/* 按照指定顺序排序*/select * from personorder by case constellation when '白羊' then 1 when '金牛' then 2 when '双子' then 3 when '巨蟹' then 4 when '狮子' then 5 when '处女' then 6 when '天秤' then 7 whe...原创 2018-11-06 16:21:53 · 9633 阅读 · 1 评论