select 区号
from 表
group by 区号

解决方案 »

  1.   

    select distinct(区号) from 表   --查询出不同的区号
    select count(distinct(区号)) from 表  --查询出区号的个数
      

  2.   

    select distinct 区号列 from tselect count(distinct 区号列) from t
      

  3.   

    select 区号
    from 表
    group by 区号select @@rowcount 
      

  4.   

    select 区号,count(*) as 个数 from 表
    group by 区号select * from 表
    group by 区号
    order by 区号