select a from tbl
union
select b from tbl
union
select c from tbl
union
select d from tbl
union
select e from tbl
union
select b from tbl
union
select c from tbl
union
select d from tbl
union
select e from tbl
select DISTINCT a as bb
union
select DISTINCT b as bb
union
select DISTINCT c as bb
union
select DISTINCT d as bb
union
select DISTINCT e as bb
union
..
..
..等等最后得到 bb的结果集谢谢大家