New to postgres.
I have a column called "customer_id" in Postgres currently defined as "character varying".
Looking in the DB, a lot of the rows have NULL.
I need this column to be an INTEGER with possible NULL value.
How can I do that in postgres?
I tried running query :
alter table leads alter column customer_id type INTEGER using CAST("customer_id" as INTEGER);
But I get an error saying:
default for column "customer_id" cannot be cast automatically to type integer