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

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]