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...

Write one update command to update seqno field of a table
on the basis of row number.

Answer Posted / manoranan sethy

create sequence s1
start with 1
/
create table t1
(
tid number
);
insert into t1 values (s1.nextval);
insert into t1 values (s1.nextval);
insert into t1 values (s1.nextval);
insert into t1 values (s1.nextval);
insert into t1 values (s1.nextval);

select rownum, tid from t1;

update t1 set tid=6 where rownum=1;


select rownum, tid from t1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is not null in sql?

997


What is normalisation and its types?

1005


what is the difference between myisam static and myisam dynamic? : Sql dba

1066


What are the types of index in sql?

1070


What is cross join sql?

918


What are the two types of exceptions.

1171


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

2223


What does rownum mean in sql?

1026


What is the use of sql trace?

952


Why select is used in sql?

1021


What is rownum in sql?

1043


Why coalesce is used in sql?

1012


what is a cursor? : Sql dba

1024


Can variables be used in sql statements?

1033


What is parallel hint?

1328