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 group function in sql?

547


Is sql database free?

541


What is not in sql?

508


What is a primary key called that is made up of more than one field?

805


what is 'mysqld'? : Sql dba

554






how to install mysql? : Sql dba

590


How do you update sql?

525


What is prepared statement in sql?

558


What is the difference between count 1 and count (*) in a sql query?

508


Is the primary key an index?

606


What is faster join or subquery?

523


Are there any features that are decommissioned in 11g that are not present in 11g?

1608


What are the types of functions in sql?

575


Can a foreign key have a different name?

521


Define tables and fields in a database

651