I am trying to alter a tables column with a default value of -11 and it can be null
ALTER TABLE devicedata ALTER COLUMN "weather" smallint NULL DEFAULT -11 ;
it says error
In Postgres the syntax for this is:
alter table device_data alter column wheather type smallint;
Then you can change the default:
alter table device_data alter column wheather set default 10;
The column keyword is optional.
type????????????