postgreSQL的一些sql语句
来源:互联网 发布:淘宝的结算方式 编辑:程序博客网 时间:2024/05/21 11:17
<select id="selectBySendUser_replyModifyTime" resultMap="BaseResultMap" parameterType="map" >
select s1.* ,
(select s2.MODIFY_TIME from DYRKB_SUGGEST s2 where s2.type=1 and s2.REF_ITEM_GUID = s1.ITEM_GUID order by s2.MODIFY_TIME desc limit 1) as modifyTime
from DYRKB_SUGGEST s1
where s1.SEND_USER = #{hashMapQuery.sendUser,jdbcType=VARCHAR} and s1.type=0
order by modifyTime desc nulls last
limit #{hashMapQuery.pageSize} offset #{hashMapQuery.from}
select s1.* ,
(select s2.MODIFY_TIME from DYRKB_SUGGEST s2 where s2.type=1 and s2.REF_ITEM_GUID = s1.ITEM_GUID order by s2.MODIFY_TIME desc limit 1) as modifyTime
from DYRKB_SUGGEST s1
where s1.SEND_USER = #{hashMapQuery.sendUser,jdbcType=VARCHAR} and s1.type=0
order by modifyTime desc nulls last
limit #{hashMapQuery.pageSize} offset #{hashMapQuery.from}
</select>
nulls last:是指将空值的记录排在后面
nulls first:是指将空值的记录排在前面(默认)
- postgreSQL的一些sql语句
- postgresql删除重复记录的一些相关sql语句
- Postgresql常用的表字段操作语句以及其他一些SQL语句
- sql的一些语句
- 【DB.PostgreSQL】省略PostgreSQL的SQL语句中的双引号
- ORACLE和POSTGRESQL的SQL语句比较
- PostgreSQL简单的动态SQL语句
- PostgreSQL中timestamp相关的SQL语句
- postgresql sql语句
- postgresql 字段sql语句
- Postgresql常用SQL语句
- Postgresql常用SQL语句
- PostgreSQL postgre sql 的一些特性
- [SQL]postgreSQL中如何查找无主键的sql语句
- 一些有用的SQL语句
- SQL 的一些核心语句
- 一些常用的SQL语句
- 一些常用的SQL语句
- vs2010下调用matlab2012b调试方法
- C程序编译过程
- Android新闻客户端开发2--主界面业务逻辑实现
- centos6.2/6.4下yum安装phpmyadmin与配置
- 中大 9095. Islands
- postgreSQL的一些sql语句
- UX: useradd: ERROR: Inconsistent password files. See pwconv(1M)
- 使用uWebKit发现的一个问题
- 两个管理的故事(踢猫效应&火鸡的故事)
- 修改oracle服务名
- Oracle 中rank() over()的用法
- 空指针
- Jquery的基本用法
- python实现下载pop3邮件保存到本地