各位老哥幫忙解答下疑惑,問題如下:
select
*
from
fstaid_paramword_relation t
where t.param_id in (
--'121','122','123');
(select listagg (''''||b.param_id||'''', ',')
within group(order by b.param_id) as param_id
from Fstaid_Interface_Detail b where b.parent_param_id = '120')
);

in中的子查詢結果為注釋的'121','122','123',
用子查詢就查詢結果為空,用注釋的能正常查詢結果
uj5u.com熱心網友回復:
使用注釋中的查詢結果:
使用子查詢的查詢結果:
uj5u.com熱心網友回復:
select*
from fstaid_paramword_relation t
-- 直接寫成如下形式多好,樓主先拼接再拆分的意圖是什么呢?
where t.param_id in (select b.param_id from Fstaid_Interface_Detail b where b.parent_param_id = '120')
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/165282.html
標籤:開發
