tags:

views:

33

answers:

3

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

A: 

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;
cdnicoll
the value of fields should be equal to corresponding row number not blank
silverkid
An Autonumber field will be populated when it's created. However, the resulting ordering may not be exactly what you expect.
David-W-Fenton
A: 

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

Wael Dalloul
no once the data is entered in the table the new field cant be set to autoincrement ..
silverkid
A: 

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.

pavun_cool