语句 1 要用触发器?或者设置表一的某种初始参数?不懂,不会没遇过相似情景。 2:(select u.name from utab1 u left join posts p on u.id = p.u_id) union all (select u.name from utab2 u left join posts p on u.id = p.u_id) 3:select p.title from utab2 u left join posts p on u.id = p.u_id where u.id = 1002