1
我做級聯的SELECT:合併多個級聯選擇,優先
SELECT * FROM x WHERE a = 1 AND b = 2 AND c = 3
=> If nothing found, try: SELECT * FROM x WHERE a = 1 AND b = 2 AND c = 0
=> If nothing found, try: SELECT * FROM x WHERE a = 1 AND b = 0 AND c = 0
至少其中一人有一個結果,但可以適用於所有情況的結果。我想合併這個邏輯並僅返回一個案例,即給定最多(!= 0)條件的案例。
謝謝!
我只是準備了這個小提琴:http://sqlfiddle.com/#!9/e4e7b2/1 – fthiella
輝煌,謝謝! – root66