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
Explain unique key in sql.
What is type and rowtype in pl sql?
What is a recursive stored procedure?
Are sql connections encrypted?
What are sql built in functions?
How do you clear the screen in sql?
What is informix sql?
What is sql analyzer?
Can we use the cursor's to create the collection in PL/SQL?
how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba
Which sorts rows in sql?
What is a trigger in sql?
How do I run a pl sql program?
Can we insert in view in sql?
Is sql similar to python?