Home:ALL Converter>Changing a column in oracle that has a foreign key constraint

Changing a column in oracle that has a foreign key constraint

Ask Time:2009-05-16T04:53:21         Author:Joshua

Json Formatter

I have a column that is only 6 characters long in a table that references a column that is 20 characters using a foreign key constraint. How do I fix this?

Note: The issue was due to the limitation of the Oracle SQL Developer Edit table. When I performed the specific alter column, it worked fine.

Author:Joshua,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/870819/changing-a-column-in-oracle-that-has-a-foreign-key-constraint
Mark Roddy :

SQL> create table parent_tbl(col1 char(20) primary key);\nTable created.\nSQL> create table child_tbl(col1 char(6) primary key, constraint col1_fk foreign key (col1) references parent_tbl(col1));\nTable created.\nSQL> alter table child_tbl modify col1 char(20);\nTable altered.\nSQL>\n",
2009-05-15T21:00:54
yy