I can't seem to find the problem with this statement, yet it just won't run:
ALTER TABLE Table1 ALTER COLUMN Field1 smallint NOT NULL DEFAULT 0;
I'm trying to set the default value of an existing column, but it gives an error. I also tried:
ALTER TABLE Table1 ALTER COLUMN Field1 smallint DEFAULT 0 NOT NULL;
I know it's possible, as it can be done through Enterprise Manager, but SQL doesn't allow it.
Any ideas?
Regards
-- John