select distinct 列1,列2 from t

解决方案 »

  1.   

    distinct 不行啊。因为我的列有很多,20多个要一个一个列出来太麻烦。有更好点的办法吗?
      

  2.   

    1:
    select distinct 列1 from t2:
    select t.* from (select identity(id int,1,1,),mytable.* from myTable) t where t.id=1
      

  3.   

    1 3 1 1 1 省调-长沙 电脑 光纤1 1.....
    1 3 1 1 1 省调-长沙 电脑 光纤2 1.....就象上面的两行,我只要其中的一行就行。除了不用distinct还有什么别的办法吗?
      

  4.   

    select top 1 mytable.* from myTable
      

  5.   

    请问以下id和mytable 各指什么?
      

  6.   

    1:
    select * from tblRd where strType='光纤1'
    2:
    select distinct intRDId,intRId,intDId from tblRD where strType='光纤1'???
      

  7.   

    上面在前面有个函数有用错勒。
    还是更正一下:
    identity(int,1,1) as Id