优化sql,在线等!~~~
发布网友
发布时间:2022-05-19 11:39
我来回答
共3个回答
热心网友
时间:2023-10-11 10:36
Select a.name
From a, b, c, (Select name From d group by name) d
Where a.id = b.id
And b.ent_id = c.id
And c.username = d.name
And b.key = 'shell'
热心网友
时间:2023-10-11 10:36
SELECT A.NAME
FROM A
LEFT JOIN B ON A.ID = B.ID
LEFT JOIN C ON B.ENT_ID = C.ID
WHERE EXISTS (SELECT 1 FROM D WHERE D.NAME = C.USERNAME)
AND B.KEY = 'shell';
热心网友
时间:2023-10-11 10:37
select a.name from a
join b on a.id=b.id
join c on b.ent_id=c.id
where b.key='shell' and c.username in (select distinct d.name from d)追问不行,还是死机。。。是不是因为in的问题?真郁闷