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
Compare sql & pl/sql
What are commit, rollback, and savepoint?
How do you remove duplicates without using distinct in sql?
How to display the records between two range in Oracle SQL Plus?
How do you update a table in sql?
Can you join a table to itself?
What sql does db2 use?
Differences between Oracle 9i and 10g (Probably in terms of SQL and PL/SQL)?
What is audit logout in sql profiler?
What is autocommit sql?
What is the need of merge statement?
What is procedure function?
What is sqlite used for?
What does fetching a cursor do?
what tools available for managing mysql server? : Sql dba