Can't see created tables in Object Explorer - Microsoft SQL Management Studio
I had a scenario in which refreshing the folders in Object Explorer did not lead to my missing table appearing in either of the Tables or Views folders. Like the original post, I am able to query the table - but not find it in Object Explorer.
The Microsoft docs on the FROM clause specify that FROM is followed by table_source which is a qualified table_or_view_name which is defined as "Is the name of a table or view". Yet while my FROM clause works, no such table or view name appears in Object Explorer (even after refresh). What's going on here?
The original question had the following query:
select name, type_desc from testDB.sys.objects
which simplifies to:
select name, type_desc from sys.objects;
and this gave me the answer to my scenario, which differed from the original question.
In the original question the missing table's type_desc value was USER_TABLE, but in my case it showed SYNONYM.
There is, in fact, another folder in Object Explorer for Synonyms - and this is where I found the "table" I was querying. (It would be helpful if Microsoft updated their doc to mention the fact that a Synonym name is also a valid value for use with the FROM clause - at least in my case, synonyms are not frequently used).