I have two questions. Both of these are for 1 table in a database.
I have a table "performance".
Name Info
x 12.5
y 9
z 10
How can I add a column Index in the table, as shown below? My desired output is -
Index Name Info
0 x 12.5
1 y 9
2 z 10
.......
Assume that I have thousands of rows just like above in 1 table.
How can I insert row numbers in each row in postgresql database? The second questions is how can I read the Index column one by one and print it on the screen?
I am using Python to interact with this database.
I want to use a function using row_number() to generate numbers and insert a column in the database tables.