請教大家一個問題,我在oracle的SQL陳述句where 條件里想做個判斷:
如果ta.orderno 為空, 則不加判斷條件;
如果ta.orderno不為空,則加上 ta.orderno = tc.orderno
這個想加在where條件里怎么處理?
uj5u.com熱心網友回復:
ta.orderno = tc.orderno or ta.orderno is nulluj5u.com熱心網友回復:
where ta.orderno is null or ta.orderno = tc.ordernouj5u.com熱心網友回復:
where ta.orderno = tc.orderno or ta.orderno is null轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/77993.html
標籤:開發
上一篇:toad中sql中如何定義變數
