TABLE A 
(UID,UNAME)TABLE B
(UID,CODE1)

解决方案 »

  1.   


    类似这样:
    create table tablea(UID int,UNAME varchar(10))
    insert into tablea select 1,'asd'
    insert into tablea select 2,'sadf'
    insert into tablea select 3,'ewr'
    insert into tablea select 4,'va'
    insert into tablea select 5,'233333'
    select top 10 px=identity(int,1,1) into # from sysobjectsselect * from # c left join 
    (select px=(select count(1) from tablea where uid<a.uid)+1,* from tablea a)b
    on c.px=b.px
      

  2.   

    谢谢你了
     可是我不是sql 编程,是VBA编程。
      

  3.   

    谢谢你了 
      可是我不是sql   编程,是VBA编程。
    --------------------------------
    C#还会,VBA不会了。呵呵```