Skip to content

Instantly share code, notes, and snippets.

/*
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', '')