阅读:1502回复:1
[求助]在表中自动添加ID的值的语句要怎么写update 表 set id = ??
在表中自动添加ID的值的语句要怎么写update 表 set id = ??
|
|
1楼#
发布于:2005-06-21 19:29
<P>dim myid as integer</P>
<P>dim Objrowid as integer</P> <P>myid=1</P> <P>select * from TableName</P> <P> into MyTable</P> <P>fetch first from MyTable</P> <P>while not eot(MyTable)</P> <P> ObjRowid=MyTable.Rowid</P> <P> update Mytable </P> <P> set ID=myid</P> <P> where Rowid=Objrowid</P> <P> myId=myid+1</P> <P> fetch next from MyTable</P> <P>wend</P> |
|