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 are transaction and its controls?

1089


How to add, remove, modify users using sql?

1087


What is difference between hql and sql?

1161


Explain unique key in sql.

1059


what is a database lock ? : Sql dba

1221


What is the difference between unique and primary key constraints?

1118


how to start mysql server? : Sql dba

1233


How is use pl and sql?

1105


What is sql and its types?

1250


what is try_catch block in procedure

1807


What is the difference between left join and right join?

986


What are the most important ddl statements in sql?

1183


What do you mean by dbms? What are its different types?

1059


What is a scalar value in sql?

1122


Can instead of triggers be used to fire once for each statement on a view?

1006