-1
如何將此查詢加入單選(無臨時表)?加入選擇
SELECT t2.value,
t1.value
FROM table0 t1
INNER JOIN table1 t3 on t1.idrelation = t3.id and [email protected]
INNER JOIN table2 t2 on t2.idversion = t3.idchild and t2.name = 'FOO'
ORDER BY t1.value
SELECT SELECT COALESCE(t4._NAME+','+'')
FROM table1 t1
JOIN table1 t2 on t2.idparent = t1.idchild
JOIN table1 t3 on t3.idparent = t2.idchild
JOIN table3 t4 on t4._ID = t3.idchild
WHERE t1.idparent = @id
AND t4._TYPE ='TXT_CAT'
如何你想加入嗎? t2.value,t1.value,t4._NAME? –
你可以發佈一些樣本數據嗎? –