-7

How to rename table name in MS SQL Server. I have created table. Required to change table name in MS SQL Server.

Thanks

SLNS001
  • 11
  • 1
  • 3
  • There are plenty of resources out there if you just Google it: https://www.google.com/search?q=rename+table+name+in+MS+SQL+Server. Is there a particular problem you're having that we can help with? – Jeff Rosenberg Apr 30 '13 at 13:41
  • I suppose right clicking the table name and selecting rename isn't what you are looking for... – Tanner Apr 30 '13 at 13:41
  • @Tanner Not if it's part of a series of schema changes wrapped in one transaction. – deutschZuid May 08 '14 at 23:55

1 Answers1

4

Use sp_rename:

EXEC sp_rename 'dbo.old_table_name', 'new_table_name';

This is assuming your table resides in schema dbo.

Mithrandir
  • 24,869
  • 6
  • 50
  • 66