SELECT * FROM (
SELECT coll.collection_id, coll.report_id, coll.new_id, news.title,news.abstract_txt,news.url,coll.coll_time FROM tb_collection_report AS coll, tb_news AS news
WHERE coll.collection_id =  #{collectionID,jdbcType=VARCHAR} AND coll.new_id = news.nid
UNION ALL
SELECT coll.collection_id, coll.report_id, coll.new_id, report.title,report.abstract_txt,report.url,coll.coll_time FROM tb_collection_report AS coll, tb_report AS report
WHERE coll.collection_id =  #{collectionID,jdbcType=VARCHAR} AND coll.report_id = report.id
) AS temp
ORDER BY temp.coll_time DESC
LIMIT #{limitStart,jdbcType=INTEGER}, #{limitEnd,jdbcType=INTEGER}

最新文章

  1. Oracle SGA优化
  2. Assign an Elastic IP Address to Your Instance
  3. [转]搬瓦工换机房换ip之后不能连外网
  4. sed 引入shell变量
  5. java反射基本使用操作
  6. vb.net三层实现登录例子
  7. 关于前置式递增和后置式递增的小知识(++x与x++)
  8. mina2.0 spring
  9. 使用Maven构建javaWeb项目时,启动tomcat出错:严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.conte
  10. 转:Python 与 Excel 不得不说的事
  11. 新版ADT出现appcompat_v7的问题
  12. c# in depth之泛型的实现
  13. 工控中的windows
  14. hdu_5963:朋友
  15. selenium 对chrome浏览器操作
  16. Swift tableview自带的刷新控件
  17. LeetCode 811 Subdomain Visit Count 解题报告
  18. spring注解注入的学习
  19. ABP配置模块扩展
  20. vs的【warning C4996:'fopen': This function or variable may be unsafe】解决方案

热门文章

  1. 使用php技术实现无刷新的上传文件
  2. java自定义异常(Exception、throws、try-catch)
  3. hive中rcfile格式(收藏文)
  4. MFC 给对话框注册热键
  5. json与对象转化
  6. javascript之Dorm
  7. String easy 结束日
  8. oracle合并版本
  9. 【简易版】HashMap(增删改查)
  10. Basic Calculator