[英]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 inserted by me with row numbers
我需要有一个列,该列的值将作为行号,如何编写sql查询以行号填充由我插入的空列
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;
使Field数据类型为AutoNumber,它将自动为您完成。
Write a sequence for your table . 为表写一个序列。 Then have default value as sequence .
然后将默认值作为sequence。
So, whenever the column does not get users values , it will take the sequence values. 因此,只要该列没有获得用户值,它将采用序列值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.