可以用pg自带函数select extract(dow from current_date),之所以没用主要是展示一下通过数学方法计算日期的原理. drop function if exists getDateWeek(date);drop function if exists intervalDay(date);drop function if exists getMonMaxDay(integer,integer);drop function if exists getMonMaxDate(
MySQL左右连接查询中的NULL的数据筛选问题 xpression 为 Null,则 IsNull 将返回 True:否则 IsNull 将返回 False. 如果 expression 由多个变量组成,则任何成员变量中的 Null 将导致为整个表达式返回 True. SELECT g.name,g.type_id,t.type_id,t.type_name FROM game g LEFT JOIN game_type t ON t.type_id=g.type_id where not I