FROM (SELECT p1.name AS name1, p2.name AS name2 FROM friend f INNER JOINperson p1 ON f.person_id = p1.id INNER JOIN person p2 ON f.friend_id = p2.id WHERE p2.name LIKE 'GinaUNION ALL (SELECT p1.name AS name1, p2.name
我有一个想要优化的sql查询。我不是数据库的设计者,所以我没有办法改变结构、索引或存储过程。 dbo.PatientView.CPRNR AS patientCPR dbo.BHLFORLINIE ON dbo.BHLFORLOEB.BhlForloebID = dbo.BHLFORLINIE.BhlForloebID
IN