mysql结果集中加序号和结果集中加默认值

<select id="finddepositproductdetail" parameterType="String" resultType="Map">
  select (@x :=@x+1) as rownum,coalesce(t.money_level_min,0) as money_evel_min,coalesce(t.time_level,0) as time_level,coalesce(t.rates,0) as rates
  from t_deposit_rates t,(select @x :=0) b
  where t.product_no = #{product_no}
  order by money_level_min,time_level,rates   
 </select>


mysql结果集中加序号和结果集中加默认值

你可能感兴趣的:(mysql结果集中加序号和结果集中加默认值)