SQL: <update id="updateSalesManId" parameterType="map" > update T_BC_LISTINGIMAGE <set> FKSALESMANID='${salesmanId}' </set> where fhouseid='${roomlistingId}' AND fid in (select fid from ( select fid from T_BC_LISTINGIMAGE ORDER BY fcreatetime desc limit ${count} ) t) </update>