Have a very strange problem when trying to rename a table and use it.
I have a table called oldTable and rename it to newTable .
I can successfully use select in this table using:
SELECT * FROM database.dbo.newTable;
But when I try to use the update as follows:
UPDATE database.dbo.newTable SET foo = bar where id = 1;
I get the following error:
Msg 208, Level 16, State 1, Procedure archive, Line 4 [Batch Start Line 0]
Invalid object name 'oldTable'.
It looks like the name oldTable was stored somewhere and is used here with some kind of reference. This happens on both ssms and raw php + sql when trying to upgrade.
Does anyone have an idea?
source
share