aleksanteri Posted July 8, 2006 Share Posted July 8, 2006 Is there a simple way to rename a table? Something like: RENAME TABLE COMMENT TO COMMENTS or something like that? Link to comment Share on other sites More sharing options...
aquatsr Posted August 17, 2006 Share Posted August 17, 2006 Why not just drop the old table and query in the new one? If the table doesn't have too many fields it would take just a few seconds. Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 17, 2006 Share Posted August 17, 2006 But all data in it will be lost. There is a valid way of renaming tables though. Like this: ALTER TABLE [i]tablename[/i] RENAME [i]newtablename[/i] Link to comment Share on other sites More sharing options...
nomore_sr Posted August 20, 2006 Share Posted August 20, 2006 This is my solution sp_rename 'TableName','NewName' Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now