I want to change the dataType of primary key from varchar to bigint.
I tried following command.
ALTER TABLE dbo.Company
ALTER COLUMN Id bigint
but it is not working as this column is referenced as the foreign key in other tables.
How can i change its type without loosing data of the table through Sql Query?