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 two different parts of the pl/sql packages?
what is a constraint? : Sql dba
Write a sql query to get the third highest salary of an employee from employee_table?
What is a constraint? Tell me about its various levels.
explain about mysql and its features. : Sql dba
How many primary keys can a table have?
What are primary key and foreign key and how they work?
What is cold data?
What are the dml statements?
what is the difference between blob and text? : Sql dba
How many sql databases can you have on one server?
What is case function?
What is the difference between between and in condition operators?
What is the difference between sql, mysql and sql server?
Can procedure in package be overloaded?