select * from park_room where parkNum in (
select parkNum from park_room group by parkNum
having count(parkNum) > 1
) order by parkNum字段信息说明:
park_room--停车位表
parkNum--车位号
例子
去除重复记录
代码如下
复制代码
SELECT COUNT(distinct parkNum) AS num FROM park_room WHERE `areaId` = 1 AND `status` = 0 LIMIT 1