sql查询一个表内包含某个字段值对应的两个字段的所有数据

2025-03-18 12:01:16
推荐回答(1个)
回答1:

实现SQL语句如下(假设表名为T1):

select a.* from T1 a where exists(

select 1 from T1 b where b.id=77 and b.starttime=a.starttime 

and b.score=a.score and b.endtime=a.endtime);