-3

I have created a table with primary key and foreign key using SQL Server Management studio 2008R2, then I have drop the table using the sql command drop table nameofthetable and the table has been dropped. After that I have created another table with the same name of the dropped table but I get this error:

" The table 'name of my table' already exists'.

Why? I don't see the old table in my table list.

Can you help me, I need to create the table with this name?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
ezechiele2517
  • 375
  • 1
  • 5
  • 19

2 Answers2

1

Commit your changes before you recreate the table. You can also use the GO statement.

Community
  • 1
  • 1
BartoszKP
  • 34,786
  • 15
  • 102
  • 130
0

In the Object Explorer, right-click and Refresh the Tables list

BWS
  • 3,786
  • 18
  • 25