ALTER TABLE table_name ALTER COLUMN column_name [int] (4) NULL;
unable to execute the script, please assist how can I add maximum length to already existed column for an int data type.
If I understand correctly, you want to add a constraint to the column so that it cannot contain a value larger than 9999
:
ALTER TABLE table_name
ADD CONSTRAINT CK_column_name_RANGE CHECK (column_name >= 0 AND column_name <= 9999)