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


Please Help Members By Posting Answers For Below Questions

What is linq to sql?

550


What are the differences between in and exists clause?

564


How to assign sql query results to pl sql variables?

507


What is left join example?

500


What is normalization in a database?

610






How to place comments in pl/sql?

602


Why commit is not used in triggers?

576


Is delete faster than truncate?

543


Can we call dml statement in function?

540


What are views in sql?

543


Does pl sql work in mysql?

532


Does access use sql?

555


Is merge a dml statement?

520


What is the difference between numeric and autonumber?

498


What is faster join or subquery?

508