ExercisePaperDAOImpl
// 查询训练记忆试题
public List findTTMemory(int userid, int ttid, int ttgid) {
String sql = "select * from tbTTrainMemory where userid=? and ttid=? and ttgid=? order by dbms_random.value";
Object[] args = { userid, ttid, ttgid };
return basedao.getJdbcTemplate().queryForList(sql, args);
}
几个参数值为
userid =1 ttid =41 ttgid=21
select * from tbTTrainMemory where userid=1 and ttid=41 and ttgid=21 order by dbms_random.value
转变成mysql后
select * from tbTTrainMemory where userid=1 and ttid=41 and ttgid=21 order by rand();
oracle和mysql随机数的问题
猜你喜欢
转载自1055592535.iteye.com/blog/1673141
今日推荐
周排行