Collections:
"sp_rename ... 'OBJECT'" - Renaming Existing Tables in SQL Server
How to rename an existing table with the "sp_rename" stored procedure in SQL Server?
✍: FYIcenter.com
If you have an existing table and you want to change the table name, you can use the "sp_rename ... 'OBJECT'" stored procedure. "sp_rename" allows you to change names of COLUMN, DATABASE, INDEX, USERDATATYPE, and OBJECT (including tables). The tutorial example below shows you how to rename a table:
sp_rename 'tip', 'faq', 'OBJECT' GO Caution: Changing any part of an object name could break scripts and stored procedures. SELECT name, type_desc, create_date FROM sys.tables GO name type_desc create_date faq USER_TABLE 2007-05-19 23:05:43.700 tipBackup USER_TABLE 2007-05-19 23:25:23.357
You can also rename a table with on the Object Explorer window of SQL Server Management Studio. See tutorials on rename table columns.
⇒ "DROP TABLE" - Deleting Existing Tables in SQL Server
⇐ "ALTER TABLE ... ALTER COLUMN" - Changing Column Data Type in SQL Server
2016-11-15, 3603🔥, 0💬
Popular Posts:
How To Start Instance with a Minimal Initialization Parameter File in Oracle? The sample initializat...
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...
What Is Transport Network Substrate (TNS) in Oracle? TNS, Transport Network Substrate, is a foundati...
How To Connect ASP Pages to Oracle Servers in Oracle? If you are running Windows IIS Web server and ...
How To Create a Table Index in Oracle? If you have a table with a lots of rows, and you know that on...