爲了避免聯表查詢,需要在sql語句結果中增加一個字段:
原sql語句爲:
select c.* from (select rownum as r,b.* from (select t.,t.,t.,t.,t.,t.user_id_encrypt,t.,t.create_time,t.,t.,t.,a.user_type from T_WIKI_DOC_POSTS t inner join t_wiki_user a on t.user_id_encrypt=a.user_id_encrypt where doc_topics_id_encrypt='bAAReRlFZ,X0NYX1oCA,1lDVw'
order by CREATE_TIME )b where rownum<=20)c where c.r>=1
修改爲:
select c.* from (select rownum as r,b.* from (select t.,t.,t.,t.,t.,t.user_id_encrypt,t.,t.create_time,t.,t.,t., 0 as user_type from T_WIKI_DOC_POSTS t where doc_topics_id_encrypt='jRANBCFgWA1FeA0BGA0AJXA**'
order by CREATE_TIME )b where rownum<=20)c where c.r>=1