select count(distinct Field1) from table1
select count(Field1) from table1
看看是不是相等

解决方案 »

  1.   

    select count(*) form t1 group by xh
    if Fields[0].asInteger>1 then
      重复
      

  2.   

    select 学号,count(*) num from 表 group by 学号
    where num > 1
      

  3.   

    select distinct Field from table
    select Field from table
    如果两个SQL返回的记录不同,说明有相同的值 
      

  4.   

    如果你的数据库支持,用分组查询吧:select "学号", Count("学号") from table1 group by "学号" having Count("学号")>1
      

  5.   

    SELECT 学号,COUNT(*) AS 重复数
    FROM 你的表名
    GROUP BY 学号
    HAVING COUNT(*) > 1