Hello ,
This error comes if there exists some foreign key constraints . To avoid this issue , you first drop the foreign key constraints then alter the column and then create the foreign key constraint again .
Try this
ALTER TABLE [dbo.childtable] DROP CONSTRAINT [FK_Non-MOL_Corporate];
---do the other stuff
ALTER TABLE NON_MOL_Corporate
ALTER COLUMN [CorporateId] varchar(50)
ALTER TABLE [dbo.childtable] ADD FOREIGN KEY (FK_Non-MOL_Corporate)
REFERENCES NON_MOL_Corporate(CorporateId);
Thanks