我有兩個表T1和T2PostgreSQL的連接查詢
T1
-id
-columnA
-columnB
-columnC
T2
-id
-columnX
-columnY
-columnZ
我有一個像
Select t1.* t2.columnZ
from T1 t1
left join on T2 t2 on t1.id = t2.id
where t2.columnZ = 'test'
查詢我要像結果,如果「裏t2.columnZ =‘測試’」不會返回任何行,那麼它應該columnZ的返回值作爲空值
你能解釋一下你需要的輸出嗎? –