delete from 【his_bed】
where 【bed_id】 not in
(select a.id from ((select min(【bed_id】) id from 【his_bed】 group by 【ward_code】,【bed_no】) a))
【】里就是要改的
delete from 【his_bed】
where 【bed_id】 not in
(select a.id from ((select min(【bed_id】) id from 【his_bed】 group by 【ward_code】,【bed_no】) a))
【】里就是要改的