0
我想知道是否有方法通過查找查詢來確定表之間的父 - 子關係。使用查詢來確定表之間的關係
select...
from table1
where
oid in (
select oid from table2
where mid = ? and goid = ? and table1_number = ?)
union
select 0 , oid from table2 where mid=? and goid=? and is_default=\'Y\'
) order by priority desc ';
我還能弄清楚它是1 - >多1 - > 1還是多對多?
我不認爲這個問題很清楚,擴展它可能會很好 –
我正在使用sql。謝謝波西米亞 – jgvb