Altering a column to be nullable

If this was MySQL syntax, the type would have been missing, as some other responses point out. Correct MySQL syntax would have been:

ALTER TABLE Merchant_Pending_Functions MODIFY NumberOfLocations INT NULL

Posting here for clarity to MySQL users.


Assuming SQL Server (based on your previous questions):

ALTER TABLE Merchant_Pending_Functions ALTER COLUMN NumberOfLocations INT NULL

Replace INT with your actual datatype.


In PostgresQL it is:

ALTER TABLE tableName ALTER COLUMN columnName DROP NOT NULL;

Tags:

Sql