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 would you convert date into julian date format?
What is set serveroutput on?
Mention what are different methods to trace the pl/sql code?
What is a dirty read sql?
What is the use of primary key?
Explain what is an index?
What is dcl in sql?
What is anonymous block in sql?
How much ram can sql express use?
What is a procedure in pl sql?
what are date and time functions in mysql? : Sql dba
what tools available for managing mysql server? : Sql dba
What is view explain with example?
What is join view in sql?
Explain spool.