Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Renaming n Number of Tables.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-08-23 : 09:47:32
Amjad writes "I have n number of Tables created for a particular Database. Now, I need to update the Table Names with some prefix like 'history_'.

Are there any logical ideas of doing this by writing any StoredProcedures/Scripts/etc to resolve this, apart from manual creation?"

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-08-23 : 11:00:28
U can generate the script, modify and execute it.
(All Drop queries put in the top part, all create queries modify )

eg.

CREATE TABLE [box_alias] --> Find "CREATE TABLE [" and replace with "CREATE TABLE [history_"



Srinika
Go to Top of Page
   

- Advertisement -