I have a table with a lot of columns and I would like to add the prefix ABC_
for every columns.
I tried the below query :
SELECT syscolumns.name as old_column_name, 'ABC_' + syscolumns.name as new_column_name
FROM sysobjects
JOIN syscolumns ON sysobjects.id = syscolumns.id
WHERE sysobjects.name = 'ABCtable'
ORDER BY sysobjects.name,syscolumns.colid
When I execute above query I got all my columns with the prefix ABC_
but in my table nothing has changed.