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.

Answers were Sorted based on User's Feedback



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

Answer / priyanka

update table1 set seq_no =rownum where 1=1;

Is This Answer Correct ?    9 Yes 0 No

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

Answer / rk

update emp_test a set empno=7469 where (select empno from
(select rownum r,empno from emp_test) where r=6 )=a.empno

use seqno in place of empno

Is This Answer Correct ?    5 Yes 2 No

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

Answer / 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

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

Answer / gourvendra singh

You can update the seqno which is having the rownum=1 only.
for eg:
If you have a table dept in scott user, you can try the
following command:-

update dept
set deptno=90
where rownum=1;

the above will update the record of the table which having
the rownum=1. and if you want to update some other record
then you have to make query to make the required record as
the first record of the table.

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More SQL PLSQL Interview Questions

How many types of normalization are there?

0 Answers  


why sql is used as interpreter frequently rather than a compile?

1 Answers  


what is the difference between cursor FETCH and FOR LOOP ?

3 Answers   CG-VAK, Tech Mahindra,


What is varchar used for?

0 Answers  


what is denormalization. : Sql dba

0 Answers  


Describe sql comments?

0 Answers  


What are predefined functions in sql?

0 Answers  


What is difference between a PROCEDURE & FUNCTION ?

6 Answers   Satyam,


what is the difference between delete and truncate statement in sql? : Sql dba

0 Answers  


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

0 Answers  


what is External tables? explain with examples

2 Answers   TCS,


What is the mutating table and constraining table?

0 Answers  


Categories