I have a database say test in SQLServer 2008 which have almost more than 100 tables inside it . I have requirement that I have to add prefix to these tables .
for e.g. table employee should be renamed as companyName_employee . companyName_ is the prefix I want to apply.So table department should be renamed to companyName_department
Currently I can rename tables one by one by running below query :
sp_rename employee, companyName_employee
sp_rename only renames one table at a time.
I am new to SQLServer so please suggest if there is a way to rename multiple tables in one query