select count(distinct 内容) from 表 where 时间='2003-10-12'

解决方案 »

  1.   

    select count(distinct 内容) from 表 where 时间='2003-10-12'可以实现那我想把这两条记录显示出来怎么写呢?
      

  2.   

    select count(distinct 内容) from 表 where 时间='2003-10-12'
      

  3.   

    select count(distinct 内容) from 表 where 时间='2003-10-12'
      

  4.   

    那我想把这两条记录显示出来怎么写呢?
    select distinct 内容 from 表 where 时间='2003-10-12'
      

  5.   

    去掉count不行吗?
    select distinct 内容 from 表 where 时间='2003-10-12'
      

  6.   

    select count(distinct 内容) from 表 where 时间='2003-10-12'可以实现那我想把这两条记录显示出来怎么写呢?————————————————————————————————
    两条相同的记录?将结果说清楚先!
      

  7.   

    select 时间,内容,count(内容) as count from 表
    where 时间='2003-10-12'
    group by 时间,内容
      

  8.   

    如果我再多几个字段,内容不同那你的这条SQL不是把全部时间在2003-10-12号的记录列出来啊,不够通用