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
What is varchar used for?
How do I save the results of sql query in a file?
What is optimistic concurrency control? : Transact sql
What is a recursive join sql?
How can we store rows in PL/SQL using array?
Can a foreign key have a different name?
What are sql injection vulnerabilities?
What is pl sql commands?
How do sql databases work?
What is a schema? How is it useful in sql servers?
What is a dirty read sql?
What are tables and fields in the database?
How can I tell if sql is running?
what is top in tsql? : Transact sql
How do you explain an index number?