Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In SQL Server 2008 R2 - can you rename a table in the Database Diagram tool?

I'm using the SQL Server 2008 R2 version of the Database diagram tool. Search as I might, I can't seem to find a way to rename tables in the UI. Is this really not possible? Renaming a column is easy, but the only way I've been able to "rename" a tables is to recreate it with the new name, make the appropriate foreign key relationships, and then delete the old table.

thanks, Sylvia

like image 452
Sylvia Avatar asked Nov 09 '11 15:11

Sylvia


People also ask

Can we rename a table in SQL Server?

Using SQL Server Management StudioIn Object Explorer, right-click the table you want to rename and choose Design from the shortcut menu. From the View menu, choose Properties. In the field for the Name value in the Properties window, type a new name for the table.

How can I change the table name in SQL?

Click the SQL tab at the top. In the text box, enter the following command: ALTER TABLE exampletable RENAME TO new_table_name; Replace exampletable with your table's name and replace new_table_name with the new name for your table.


1 Answers

Nope you can't do that..however just click on the table in Object explorer, hit F2 and rename it

like image 59
SQLMenace Avatar answered Oct 19 '22 11:10

SQLMenace