这个很简单啊,真是最最基本的SQL。

select distinct field1 from table 
或者
select field1 from table group by field1
都可以。

解决方案 »

  1.   

    select count(field1) as jishu,field1 from table group by field1
    所得记录集取jishu =1 的记录。灌木丛没注意人家只要不同的。
      

  2.   

    SELECT DISTINCT field1 FROM table
      

  3.   

    我程序中的一段,你参考:Dim kcNum As Long
    Dim i As LongAdodc1.ConnectionString = SN
    Adodc1.RecordSource = "select 课程名称 from curricula group by 课程名称"
    Adodc1.Refresh
    kcNum = Adodc1.Recordset.RecordCount
    For i = 1 To kcNum
        Combo1.List(i - 1) = Adodc1.Recordset.Fields(0)
        Adodc1.Recordset.MoveNext
    Next i
      

  4.   

    我不会用ADO,我用得是JET引擎!
      

  5.   

    jshyjyw(紫狐):当执行到ADODC1。REFRESH得时候出错,提示:
    sytax error in from clause
    然后 "实时错误 -2147217900(8004e14),对象refresh得方法iadodc失败。
      

  6.   

    select distinct field from table 
      

  7.   

    http://www.wzjcw.net/vbgood/taishan/index.html