请各位高手指点?

解决方案 »

  1.   

    select 字段1,count(*) from 表 where group by 字段1 having count(*)>1
      

  2.   

    select distinct(列名) from tablename-------------------------
    select count(列名) from tablename
    select count(distinct 列名) from tablename如果数量一致就没有重复的值
      

  3.   

    执行不了。数据表中有一字段Cust_id是设为主键,不能有重复,怎样利用语句判断当用户输入重复值是提示用户
      

  4.   

    用错误判断。
    on error goto a
    .....
    .....
    .....中间的“.”是你的程序。
    .....
    .....
    .....
    exit sub
    a:
       msgbox  err.Description ' (err.Description)也可换成你自已写的msgbox记得给分哈!
      

  5.   

    set Rs=conn.execute("select Cust_id from 表 where Cust_id='" & Text1.text & "'")
    if rs.bof or rs.eof then
    else
      msgbox "重复"
    endif