Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: change the name of a table

    What is the best way for me to change the name of a table

    Like I have a table called Paren_ind but Its really going to be People_tbl

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    sp_rename does fairly well.

    Code:
    sp_rename 'Paren_ind', 'Paren_tbl'
    Remember to check for any views, stored procedures, or user defined functions before doing this, or a lot of stuff could break.

  3. #3
    Join Date
    Oct 2003
    Posts
    60
    isn't that the only way to do it?

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Well, if you really wanted to, you could just build a new table with the new name, and transfer the data over. sp_rename is generally easier, though.

Posting Permissions

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