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
How do I order by ascending in sql?
define join and explain different type of joins? : Sql dba
What is the difference between truncate and drop statements?
What is the difference between between and in condition operators?
Explain how exception handling is done in advance pl/sql?
Does sql backup shrink transaction log?
What is the difference between nested table and varray?
What is an invalid partition table?
how to concatenate two character strings? : Sql dba
What is set serveroutput on?
How to connect a sql*plus session to an oracle server?
What is the purpose of the partition table?
Is sql a backend language?
What is trigger with example?
What is a pl/sql block?