Saya yakin ini akan membantu...
DECLARE @tbl sysname, @col sysname
DECLARE @cmd nvarchar(max)
DECLARE cCol CURSOR FOR
SELECT TABLE_NAME, COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '"%"'
OPEN cCol
FETCH NEXT FROM cCol INTO @tbl, @col
WHILE @@fetch_status = 0
BEGIN
SET @cmd =
N'EXEC sp_rename ''[' + @tbl + '].[' + @col + ']'', ' +
'''' + REPLACE(@col, '"', '') + N''', ''COLUMN'''
--PRINT @cmd
EXEC sp_executeSQL @cmd
FETCH NEXT FROM cCol INTO @tbl, @col
END
CLOSE cCol
DEALLOCATE cCol