oracle 模糊查询加了分页后数据显示不全 5
这是oracle语句selectbulletin_id,bulletin_title,bulletin_content,to_char(release_time,'yyy...
这是oracle 语句
select bulletin_id,bulletin_title,bulletin_content,to_char(release_time,'yyyy-mm-dd hh24:mi:ss') release_time,bulletin_level,user_name from (SELECT A.*, ROWNUM RN FROM (SELECT * FROM bulletin) A WHERE ROWNUM <= 5) where RN > 0 AND bulletin_title like '%d%' AND bulletin_content like '%%' AND release_time >= to_date('1000-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss') AND release_time <= to_date('9999-12-31 23:59:59','yyyy-mm-dd hh24:mi:ss') AND user_name like '%%' AND bulletin_level like '%%'order by release_time DESC
符合条件的有15条 (把ROWNUM <= 5 换成50查出来的)换成5为什么只显示4条 有的符合条件很多只显示1条 求大神解答 困扰几天了 展开
select bulletin_id,bulletin_title,bulletin_content,to_char(release_time,'yyyy-mm-dd hh24:mi:ss') release_time,bulletin_level,user_name from (SELECT A.*, ROWNUM RN FROM (SELECT * FROM bulletin) A WHERE ROWNUM <= 5) where RN > 0 AND bulletin_title like '%d%' AND bulletin_content like '%%' AND release_time >= to_date('1000-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss') AND release_time <= to_date('9999-12-31 23:59:59','yyyy-mm-dd hh24:mi:ss') AND user_name like '%%' AND bulletin_level like '%%'order by release_time DESC
符合条件的有15条 (把ROWNUM <= 5 换成50查出来的)换成5为什么只显示4条 有的符合条件很多只显示1条 求大神解答 困扰几天了 展开
1个回答
2017-08-23
展开全部
oracle 模糊查询加了分页后数据显示不全
select * from 表名
where 条件字段A like '%字段A的模糊值%'
and 条件字段B like '%字段B的模糊值%'
and ...;
select * from 表名
where 条件字段A like '%字段A的模糊值%'
and 条件字段B like '%字段B的模糊值%'
and ...;
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询