Column Rename Example
Q&A for users and developers of the Cardano cryptocurrency ecosystem
SELECT 'EXEC sp_rename ''' + TABLE_NAME + '.' + QUOTENAME(COLUMN_NAME) + ''', ''' + REPLACE(REPLACE(COLUMN_NAME, 'Count', 'Cnt'), 'View', 'Vw') + ''', ''COLUMN''; ' FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME LIKE '%Count%' OR COLUMN_NAME LIKE '%View%'