I have a table that contain two columns. One column "rewords" contain 12186 words. and the other column named "ID" is the column that I newly created so it is empty. I want to add numbers against the rewords column. numbers from 1, 2, 3, to 12186. i tried to use primary key not null operation but it disturbs the order and its sequence becomes unpredictable like 1,2,6,10,7,8,19.... If I manually type 1,2,3 in the fields, then it will be too time-consuming and effortful. Following is the screenshot of what I desire. I want that I could have typing from 1 to 12186 in the fields of ID column.
I also tried the following function in the query tab, but it doesn't work and gives error that "near "for": syntax error: for"
for(int i = 1; i<=12186; i++){
UPDATE tbl SET ID = i WHERE index = i;
}