34,872
社区成员
发帖
与我相关
我的任务
分享
SELECT * FROM tb a WHERE EXISTS(SELECT * FROM tb WHERE LEFT(ID,8)=LEFT(t.ID,8))
SELECT *
FROM tb AS t
WHERE EXISTS(SELECT *
FROM tb
WHERE LEFT(ID,8)=LEFT(t.ID,8)
AND ID!=t.ID)SELECT *
FROM tb AS t
WHERE EXISTS(SELECT *
FROM tb
WHERE LEFT(ID,8)=LEFT(t.ID,8))