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
Where are my tempfiles, I don't see them in v$datafile or dba_data_file?
Why primary key is required?
how can we know the number of days between two given dates using mysql? : Sql dba
what are the differences between char and varchar? : Sql dba
What are the different operators available in sql?
What is a join?
What is a delimiter in sas?
What is compute?
what is the difference between join and union? : Sql dba
How do you write a complex sql query?
Explain autonomous transaction.
how to include character strings in sql statements? : Sql dba
What is %type in sql?
What is nvl?
Is left join same as join?