In table three columns with 1 milion records(here there is
no sequence values) i want add one more column with
sequence values from the first how it is posible?
Answer Posted / shekharjchandra
Hi
That's a simple one . (if table is tab1)
1. Add column first
ALTER TABLE tab1 add col1 number ;
2. Update the col1 of tab1
UPDATE tab1 SET col1=ROWNUM.
This will populate all the rows in sequential numbers.
Hope this solves u r problem
regards
JC
| Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
How do you update a value in sql?
What is an emotional trigger?
Why we use join in sql?
What is varray in pl sql?
what is cross join? : Sql dba
What is a pragma statement?
What is the use of function in sql?
What is row_number () in sql?
How do you modify a table in sql?
What is a variable in sql?
What is a parameter query?
What is embedded sql in db2?
how do you know the version of your mysql server? : Sql dba
Why we use pl sql?
In a distributed database system, can we execute two queries simultaneously?