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

Explain unique key in sql.

1017


What is type and rowtype in pl sql?

1021


What is a recursive stored procedure?

1188


Are sql connections encrypted?

1033


What are sql built in functions?

944


How do you clear the screen in sql?

1076


What is informix sql?

985


What is sql analyzer?

1026


Can we use the cursor's to create the collection in PL/SQL?

1030


how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba

1348


Which sorts rows in sql?

1025


What is a trigger in sql?

1207


How do I run a pl sql program?

1132


Can we insert in view in sql?

1065


Is sql similar to python?

981