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

How to rename a table?

1073


What is the use of count (*) in sql?

1114


Is mariadb a nosql database?

1098


Is sql free?

1023


Which nosql database is best?

1022


describe transaction-safe table types in mysql : sql dba

1052


What is the difference between clustered and non-clustered indexes?

1126


What is mutating error?

1005


What is a sql instance vs database?

1170


What are the two different parts of the pl/sql packages?

1138


Which join is like an inner join?

1091


Why are cursors used?

1173


What is identity column in sql server?

1101


What is a data definition language?

1195


Explain the difference between rename and alias?

1063