IFNULL -> NVL, 추가: now, today 오라클 버젼

master
mjkhan21 11 months ago
parent 3076237b75
commit f3215b84f0

@ -20,16 +20,23 @@ SELECT FOUND_ROWS() TOT_CNT</select>
<sql id="orderBy"><if test="fetchSize == null or fetchSize &lt; 1"><include refid="utility.sortBy" /></if></sql> <sql id="orderBy"><if test="fetchSize == null or fetchSize &lt; 1"><include refid="utility.sortBy" /></if></sql>
<sql id="now">DATE_FORMAT(CURRENT_TIMESTAMP(), '%Y%m%d%H%i%s')</sql> <!-- 마리아 DB -->
<sql id="now">DATE_FORMAT(CURRENT_TIMESTAMP, '%Y%m%d%H%i%s')</sql>
<sql id="selectNow">SELECT<include refid="utility.now" />NOW</sql>
<sql id="today">DATE_FORMAT(CURRENT_DATE, '%Y%m%d')</sql> <sql id="today">DATE_FORMAT(CURRENT_DATE, '%Y%m%d')</sql>
<sql id="selectToday">SELECT<include refid="utility.today" />TODAY</sql> <!-- 오라클
<sql id="now">TO_CHAR(CURRENT_TIMESTAMP, 'YYYYMMDDHH24MISS')</sql>
<sql id="today">TO_CHAR(CURRENT_DATE, 'YYYYMMDD')</sql>
-->
<sql id="selectNow">SELECT<include refid="utility.now" />NOW FROM DUAL</sql>
<sql id="selectToday">SELECT<include refid="utility.today" />TODAY FROM DUAL</sql>
<sql id="thisDay">IFNULL(#{thisDay},<include refid="utility.today" />)</sql> <sql id="thisDay">NVL(#{thisDay},<include refid="utility.today" />)</sql>
<sql id="selectThisDay">SELECT<include refid="utility.thisDay" />THIS_DAY</sql> <sql id="selectThisDay">SELECT<include refid="utility.thisDay" />THIS_DAY FROM DUAL</sql>
</mapper> </mapper>
Loading…
Cancel
Save