-1
Have accountId ={001,3456,78902,456}
我想獲得這些accountId
的使用IN
子句和left join on
操作現有表的細節,我應該怎麼形成的查詢?作爲新DB結束我不能夠把正確的拼湊:如何在運營商工作已經硬編碼值匹配
select t1.col2, case when CASE WHEN t1.col3 is null THEN 'False' ELSE 'True' END as value
FROM table2 t2 left join table1 t1 on t2.col1=t1.col1
WHERE accountID IN (001,3456,78902,456); //The query is wrong because, I wanted to map using those accountID and get the data?
上形成的任何查詢快速幫助將是巨大的
現有的表有accountId
作爲其中的一列。
'accountid'是表的一部分?總是提供表格定義和您的Postgres版本,並提供類似的問題。並解釋你想要達到的目標。 –