Wednesday, March 21, 2012

rename a table

Is it possible to rename a table with T-SQL?

I can do it by rightclicking in the SQL management studio and selecting the rename menu option...

so what is the corresponding T-sql command?

thanks in advance, have a nice day

Carl

use sp_rename

Syntex,

sp_rename 'oldname' , 'newname'

|||

Thanks ManiD this is THE answer to my question... and clicking the modify button on this system stored procedure has learned me a lot new T-SQL procedures and way of working.

Thanks again and have a nice day

Carl

sql

No comments:

Post a Comment