select a.column from table a where a.column!='value' group by a.column
union all select b.column from table b where b.column='value' group by b.column
SQL查询技巧:利用UNION ALL进行数据聚合
select a.column from table a where a.column!='value' group by a.column
union all select b.column from table b where b.column='value' group by b.column
7240
427

被折叠的 条评论
为什么被折叠?