select * from table_name order by DESC(降序排列) LIMIT 5(只獲取前5行的數(shù)據(jù))
select * from table_name(默認(rèn)升序排列) LIMIT 5,10(返回第6行到第16行的數(shù)據(jù))
批量更新
uptate T_table set type =1 where find_in_set(id珊佣,“1蹋宦,2,3咒锻,4”)//將id = 1冷冗,2,3惑艇,4的type字段設(shè)置為1
UPDATE T_table SET user_type = 1
WHERE FIND_IN_SET(id,#{_parament}) //xml中這樣配置