Change All Data Type of column from different table to new one
Things that we considered Default Constraint Nullable Renamed Default constraint name to df_tablename_column_name format declare @tData varchar(25) = ‘ decimal(14,2) ‘;–1. for cols without default constraint SELECT N’alter table ‘ + OBJECT_SCHEMA_NAME(T.[object_id],DB_ID()) + ‘.’ + T.[name] + ‘ alter column ‘ + C.[name] + @tData + case when C.[is_nullable] = 0 then ‘ not null …
Change All Data Type of column from different table to new one Read More »