You want to modify the primary key of a table that already has data, and you don't want to affect the original data. Usually there are the following practices
1. When the primary key is not named
CREATE TABLE T2 (
ID Integer PRIMARY KEY,
Status varchar (10),
Last_modified Date Default Sysdate
);
select * from T2;
View Constraint_name
Select U.constraint_name from User_cons_columns u where u.table_name= ' T2 ';
Delete the primary key based on the constraint_name found
Alert table t2 drop constraint sys_c0010869
2. When there is a named
CREATE TABLE t3 (
ID Integer,
Status varchar (10),
Last_modified Date Default Sysdate,
Constraint YY primary key (ID)
);
Alert table t3 drop constraint yy;
Here by the way attached to view table column name sql
Select U.column_name from User_tab_columns u where u.table_name= ' All_sales '
Oracle modifies the primary key of a table that already contains data