我想知道是否有一种方法可以通过查看查询来确定表之间的父子关系。
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 -> many 1 -> 1 还是多对多?