SELECT 'alter table ' + TABLE_NAME + ' alter column ' + COLUMN_NAME + ' ' + data_type + '(' + CAST(CHARACTER_MAXIMUM_LENGTH as VARCHAR(5)) + ') NULL' FROM INFORMATION_SCHEMA.COLUMNS WHERE IS_NULLABLE = 'NO' AND DATA_TYPE IN ('VARCHAR','CHAR')
Post a Comment
No comments:
Post a Comment