qq_42872617
SQLExpection
采纳率33.3%
2018-10-17 11:03 阅读 810
已采纳

mysql在一个字段确定的情况下随机获取n条数据怎么实现

<select id="selectqsContent" resultType="cn.yunding.yunjuan.entity.Question">
    select `qs_id`,`qs_content` from yj_question where type_id=#{typeId}
    order by read() limit #{n};
</select>
    我这样报错了

Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@57d108c] was not registered for synchronization because synchronization is not active
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@57d108c]

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

相关推荐