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

What is sqlservr exe?

965


How is use pl and sql?

1050


what are all the different normalizations? : Sql dba

1015


What is the usage of nvl function?

1025


Explain ddl statements in pl/sql?

994


what is sp_pkeys? : Transact sql

1139


What are tables in sql?

1042


How do I count records in sql?

979


What is trigger explain it?

997


What are the different datatypes available in PL/SQL?

1066


Is pl sql useful?

967


Can 2 queries be executed simultaneously in a distributed database system?

1132


Explain the order of sql statement execution?

1028


What is the execution plan in sql?

1004


What is the difference between clustered and non-clustered index in sql?

987