In table three columns with 1 milion records(here there is
no sequence values) i want add one more column with
sequence values from the first how it is posible?
Answer Posted / saraswathi muthuraman
SQL> desc ts_200;
Name Null? Type
----------------------------------------- --------
A NUMBER
SQL> alter table ts_200 add b number;
Table altered.
SQL> desc ts_200;
Name Null? Type
----------------------------------------- --------
A NUMBER
B NUMBER
SQL> select * from ts_200;
A B
---------- ----------
1
3
7
3 rows selected.
SQL> update ts_200 set b=rownum;
3 rows updated.
SQL> select * from ts_200;
A B
---------- ----------
1 1
3 2
7 3
3 rows selected.
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What is a subquery in sql?
How is pl sql different from sql?
Explian rowid, rownum?
Can we use update in sql function?
How do we use distinct statement? What is its use?
What is implicit cursor in pl sql?
Why is sharding used?
What is difference between pl and sql?
What is data types in sql?
How do you truncate?
what is view? : Sql dba
Is it possible to link two groups inside a cross products after the cross products group has been created?
Explian rowid, rownum? What are the psoducolumns we have?
What is nested table in pl sql?
What are the various restrictions imposed on view in terms of dml?