17,137
社区成员
发帖
与我相关
我的任务
分享
--1.找出"开始时间"和"结束时间"按相同的人
select name
from tb_name a
where exists(
select 1 from tb_name b
where a.startTime=b.startTime
and a.endTime=b.startTime)
--2.判断是否有重名的name
--你的表有点问题,那个字段是主键,应该根据主键来判断是否该更新数据,
--而不是人名,因为人名有重复的