日期:2014-05-20  浏览次数:20808 次

ibatis中 sqlmap的查询语句可以用order by 排序吗??
<select id="selectHotKeywordByPage" resultClass="java.util.ArrayList"
resultMap="hotKeywordResult">
select *  from    CCC_HOT_KEYWORD hk  order by  hk.sort_value ASC
<dynamic prepend="where">
<isNotNull prepend="AND" property="cityId">
CITY_ID =
#cityId:VARCHAR#
      </isNotNull>

</dynamic>
</select>

这是我写查询排序的 代码 ?可是运行之后报的错误是:    Caused by: java.sql.SQLException: ORA-00907: 缺失右括号

请问 sqlmap中是否可以用order  by  排序呢 ?可以的话 请大家给个代码。三克油亲们!!
------解决方案--------------------
LZ 太大意了,order by 语句应该放在where之后