sql server 2005 - SQL script to rename all the table names with new name if it containes required string in mySQL and MsSQL -


i have 1 database 100 tables in it. out of 100 tables have name house, house1, house2 , housexyz , on.

now want write script in mysql , mssql replace house home. database should having table name home, home1, home2, homexyz , on.

as mentioned here would table names:

select 'exec sp_rename @objname=' + name + ', @newname=' + replace(name ,'house', 'home') sysobjects type = 'u' 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -