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
How to rename a table?
What is the use of count (*) in sql?
Is mariadb a nosql database?
Is sql free?
Which nosql database is best?
describe transaction-safe table types in mysql : sql dba
What is the difference between clustered and non-clustered indexes?
What is mutating error?
What is a sql instance vs database?
What are the two different parts of the pl/sql packages?
Which join is like an inner join?
Why are cursors used?
What is identity column in sql server?
What is a data definition language?
Explain the difference between rename and alias?