0
我試圖運行此代碼,但我得到了不止一行(這是我想要的),但顯然:=運算符只能處理一個值。什麼我需要獲得多行回(一列),這樣我可以推入下一個select語句什麼是語法
set @oids :=(
SELECT OBJECT_ID
FROM aaa K
WHERE K.TYPE IN ('ISSN', 'ISBN')
GROUP BY K.OBJECT_ID
HAVING count(distinct K.TYPE) = 2
);
select *
from aaa
where OBJECT_ID in (@oids);
請訪問http:// meta.stackoverflow.com/questions/333952/why-should-i-provide-an-mcve-for-what-seems-to-me-to-be-a-very-simple-sql-query – Strawberry