How can I resolve the “Table 'dbo.Foo' already exists.” error when the table does not exist?

前端 未结 7 1328
长情又很酷
长情又很酷 2020-12-29 18:03

I\'ve created a table and then realised I made a mistake. SSMS wouldn\'t let me update the table without recreating it, so I\'ve deleted the table and then tried to create i

相关标签:
7条回答
  • 2020-12-29 18:22

    To change this, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.

    0 讨论(0)
  • 2020-12-29 18:22

    Right-click on the Server, click on Refresh and try again! Worked like a charm for me. Hope the same works for you as well.

    0 讨论(0)
  • 2020-12-29 18:27

    Create the Table with any other name and then rename it works fine. Server refresh did not work for me. You can try to restart Management Studios though.

    0 讨论(0)
  • 2020-12-29 18:31

    Closing and restarting SSMS seems to be the only way to get rid of the error. After doing so, I can again successfully create the table.

    0 讨论(0)
  • 2020-12-29 18:32

    Make sure that you have no non-saved table changes (better to close all tabulators and try it again)

    0 讨论(0)
  • 2020-12-29 18:34

    I was having the same problem. Right-click on your server connection and select 'Refresh'. I did this and was able to save the recreated table without restarting SSMS.

    0 讨论(0)
提交回复
热议问题