have  a try:
select distinct * from (
select  a.id,a.filename from i_isofileflow a,affix b where a.filelevelid='一级文件' and b.affix_tabname='i_isofileflow' and b.tab_id=a.id order by draftdate desc
) t

解决方案 »

  1.   

    distinct a.id,a.filename 
    这里面没有draftdate了阿,你想想,两个不同的draftdate,一样的a.id,a.filename 
    ,被你distinct一下,以哪个draftdate来order by 阿?
      

  2.   

    draftdate 字段并不在你select的语句中.
    这样试试看:
    select distinct a.id,a.filename ,a.draftdate  from ...where ...order by draftdate desc
      

  3.   

    平平淡淡的方法是可行的!
    把draftdate字段加进来语句能执行了,但是改变了语句的原义。