Column rename is done using sp_rename stored procedure:
sp_RENAME '<tableName>.<oldColumnName>' , '<newColumnName>', 'COLUMN'And column data type and/or nullability is modified the following way:
ALTER TABLE <schemaName>.<tableName> ALTER COLUMN <columnName> nvarchar(200) [NULL|NOT NULL];
No comments:
Post a Comment