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

How would you convert date into julian date format?

1050


What is set serveroutput on?

1189


Mention what are different methods to trace the pl/sql code?

1304


What is a dirty read sql?

1254


What is the use of primary key?

1052


Explain what is an index?

1106


What is dcl in sql?

1024


What is anonymous block in sql?

1174


How much ram can sql express use?

1044


What is a procedure in pl sql?

1294


what are date and time functions in mysql? : Sql dba

1030


what tools available for managing mysql server? : Sql dba

1138


What is view explain with example?

1003


What is join view in sql?

992


Explain spool.

1219