Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006

    Question Unanswered: Rename a table in Microsoft SQL Server 2005


    Can you give the query in MS SQL Server 2005 which can be used to rename a existing table in database.

    Thanks in advance,

  2. #2
    Join Date
    Nov 2003
    SELECT	*
    INTO	NewTable
    FROM	OldTable
    DROP TABLE OldTable
    Keep in mind that you may need to rebuild constraints depending on the table. You can also use sp_rename, which I believe does the same thing as the sql above.
    Kit Lemmonds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts