Created
April 25, 2020 00:00
-
-
Save davidajacobus/0a725707faeedb4c176e8322666633e2 to your computer and use it in GitHub Desktop.
T-SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
RENAME ALL TABLES, DROPPING THE PREFIX | |
*/ | |
select 'exec sp_rename @objname=''' + name + ''', @newname=''' + replace(name ,'tbl', '') + '''' | |
from sysObjects | |
where type = 'U' and name like 'tbl%' | |
order by replace(name ,'tbl', '') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment