select id=(select count(1) from tb where zhujian<=a.zhujian),* from tb a

解决方案 »

  1.   

    thanks ,my computer bad.use xutao's computer.I can not zhongwei.
      

  2.   

    select *, [id]=(select count(1) from jobs b where b.job_id>a.job_id)+1 from job
      

  3.   

    --参考:
    http://blog.csdn.net/zlp321002/archive/2005/01/12/250961.aspx
      

  4.   

    select identity(int,1,1) id,* into # from 表select * from #
      

  5.   

    to : wgsasd311(自强不息) 这条语句在 TQuery 中好象不能运行啊。
    我也遇到这个问题。
    http://community.csdn.net/Expert/topic/4328/4328149.xml?temp=.989895