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 are the events on which a database trigger can be based?
Is oracel sql developer written in java?
What are the differences between implicit and explicit cursors?
What is sql partition function?
Is not equal in sql?
Is sql similar to python?
How does sql developer connect to oracle database?
What is the difference between between and in condition operators?
What is rowid in sql?
Why functions are used in sql?
What is a design view?
How do you define a foreign key?
Can we join two tables without common column?
Explain the methods used to protect source code of pl/sql.
how to load data files into tables with 'mysqlimport'? : Sql dba