开发者

how to insert a column with value row number in an access table

I have a large access table . I need to have a column which will have value as row number how can I write an sql query fill an empty column ins开发者_运维知识库erted by me with row numbers


Write a sequence for your table . Then have default value as sequence .

So, whenever the column does not get users values , it will take the sequence values.


Im sorry, im a little confused at what you're getting at, but could you not just do an alter table?

ALTER TABLE my_table
 ADD row_number  int;


Make the Field DataType AutoNumber it will do it for you automatically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜