Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Rename the Tables Name in Database SQL ?

Status
Not open for further replies.

dormingo

MIS
Mar 2, 2006
12
MY
Hi all, I have confront the trouble to rename the tables in database. Like example, want to rename the table name called "Customer" to "TBCustomer". How should I do without using the way like open the server and find the database and just rename the particular table name? If want to rename thousands of tables, how to deal with it?

Thank you.
 
sp_rename 'OldTableName', 'NewTableName'

Look up the sp_rename procedure in Books On Line for more information.

-George

"the screen with the little boxes in the window." - Moron
 
Thank you gmmastros for your kind response. It works. Thanks alot.
 
If George helped you, how about clicking on "Thank gmmastros for this valuable post!" and then clicking to confirm? We reward people around here by giving them stars.

[COLOR=#aa88aa black]Cum catapultae proscriptae erunt tum soli proscript catapultas habebunt.[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top