MySql update order by limit 同时使用需要将limit的sql再包一层

SQL:

    

        update T_BC_LISTINGIMAGE

        

            FKSALESMANID='${salesmanId}'

        

        where fhouseid='${roomlistingId}'

        AND fid in (select fid from (

        select fid from T_BC_LISTINGIMAGE ORDER BY fcreatetime desc limit ${count} ) t)

    

 

你可能感兴趣的:(MySql)