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 CUSTIDCUSTID 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.
1 Year Ago
Related Article:Alter Table and NOT NULL
is a solved MySQL discussion thread by 0xCMD that has 1 reply, was last updated 10 months ago and has been tagged with the keywords: alter, null, table.