Actually I have faced a practical problem.I created a table name called "order" with records.
After that when i am trying to execute these table it was showing error the "invalid key words in orders" beacuse order is the reserver key word in sqlserver.
I can use the "[]" to run this query after i want to rename the table.
so what i did i use the below query.
EXEC sp_rename 'order', 'tblorder'
so it will rename order to tblorder.Refresh the database and you will see the changes.
dont use alter table [tablename] rename.because "rename" is not the valid key word in sqlserver 2008.
Rename a table in sqlserver 2008
Here I will describe how to rename an already existing table with data .
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Mayur GujrathiPosted Apr 8, 2011, 2:57 AM
Thanks for sharing valuable informaton
Mayur GujrathiPosted Apr 8, 2011, 2:57 AM
Thanks for sharing valuable informaton