I am trying to change the data type of a primary key in table A from INT(11) to CHAR(11). However, this primary key is a foreign key in tables B and C. SQL is giving me an error whenever I try to change the value type of the primary key. Here is the query that I tried:
ALTER TABLE CUSTOMER
CHANGE CUSTID
CUSTID
CHAR( 11 ) NOT NULL
The error I am getting is #1025. Do I need to use a double nested query to change its data type in tables A, B, and C? I'm a bit lost here.