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
What is group function in sql?
Is sql database free?
What is not in sql?
What is a primary key called that is made up of more than one field?
what is 'mysqld'? : Sql dba
how to install mysql? : Sql dba
How do you update sql?
What is prepared statement in sql?
What is the difference between count 1 and count (*) in a sql query?
Is the primary key an index?
What is faster join or subquery?
Are there any features that are decommissioned in 11g that are not present in 11g?
What are the types of functions in sql?
Can a foreign key have a different name?
Define tables and fields in a database