recordSeq 为自增主键,missionID为可能重复键
DELETE
FROM
t_cmp_record
WHERE
recordSeq NOT IN (
SELECT
t_temp.minSeq
FROM
(
SELECT
MIN(recordSeq) AS minSeq
FROM
t_cmp_record
GROUP BY
missionID
) t_temp
)
recordSeq 为自增主键,missionID为可能重复键
DELETE
FROM
t_cmp_record
WHERE
recordSeq NOT IN (
SELECT
t_temp.minSeq
FROM
(
SELECT
MIN(recordSeq) AS minSeq
FROM
t_cmp_record
GROUP BY
missionID
) t_temp
)
mysql 中查询重复数据
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M