Rename Table not working for me

  • I'm trying to run :

     

    rename table tableone to tabletwo

     

    and get:

    Incorrect syntax near the keyword 'table'.

     

     

  • Try this out....

    EXEC sp_rename 'bcp_ki_city', 'bcp_city'

     

    Thanks,

    Ganesh

  • babuganesh2000:

    Thanks for the response..

    What this was about was part of a simple script (or series of commands) that would just sort an existing table on a particular field.

    Is there a way to do it without sending all the records to a temp table or new table with a sort and then renaming that one the old name.

    That seems lame.

    Please offer an example if you can.

     

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply