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 difference between my sql and sql?
What is the most restrictive isolation level? : Transact sql
How do you modify a column in sql?
what is the difference between where clause and having clause? : Sql dba
can a stored procedure call itself or recursive stored procedure? : Sql dba
What is mutating error in pl sql?
What is the use of sqlerrd 3?
What are the different types of tables in sql?
Can you have a foreign key without a primary key?
What is the use of primary key?
what tools available for managing mysql server? : Sql dba
What is the purpose of a sql?
How can I change database name in sql?
Can we create index on primary key?
what is a trigger? : Sql dba