select distinct zch,* from table1提示错误,在distinct附近有语法错误

解决方案 »

  1.   

    如果有关键字是field1
    select *
    from table1 ,(select zch,min(filed1) as minf from table1) t1
    where table1.field1=t1.minf
      

  2.   

    写错了:
    如果有关键字是field1
    select *
    from table1 ,(select zch,min(filed1) as minf from table1 group by zch) t1
    where table1.field1=t1.minf
      

  3.   

    select distinct zch,* from table1提示错误,在distinct附近有语法错误?
    这句话本身没错误,只是不起作用而已。
      

  4.   

    建议这样连接:select *
    from table1  where field1 in (select min(field1) from table1 group by zch)
      

  5.   

    你的意图不明,这样是无法实现的了.因为你重复的zch字段的记录其他字段值并不相同,你是要显示其中的第几条??