Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 varchar used for?

1022


How do I save the results of sql query in a file?

926


What is optimistic concurrency control? : Transact sql

940


What is a recursive join sql?

1025


How can we store rows in PL/SQL using array?

1159


Can a foreign key have a different name?

888


What are sql injection vulnerabilities?

909


What is pl sql commands?

980


How do sql databases work?

944


What is a schema? How is it useful in sql servers?

1042


What is a dirty read sql?

1033


What are tables and fields in the database?

1023


How can I tell if sql is running?

992


what is top in tsql? : Transact sql

1022


How do you explain an index number?

1022