1
WHERE
E.CNO IN
(
SELECT
CNO
FROM
COURSE
WHERE
LOWER(CNAME) LIKE LOWER('%WORLD%')
AND
LOWER(CNAME) LIKE LOWER('%HISTORY%')
)
AND
C.DNAME IN
(
SELECT
DNAME
FROM
COURSE
WHERE
LOWER(CNAME) LIKE LOWER('%WORLD%')
AND
LOWER(CNAME) LIKE LOWER('%HISTORY%')
);
這給了我正在尋找的結果,但我有點強迫症,並希望能夠縮短這個如果可能的話。貝婁是我想要做的,但我不確定運營商是否會工作。將兩個IN語句合併爲一個子句?
WHERE
E.CNO, C.DNAME IN
(
SELECT
CNO,
DNAME
FROM
COURSE
WHERE
LOWER(CNAME) LIKE LOWER('%WORLD%')
AND
LOWER(CNAME) LIKE LOWER('%HISTORY%')
);
謝謝!真的喜歡加入代碼的流程。 – defaultNINJA