table listed in information_schema.tables does not exist

All we need is an easy explanation of the problem, so here it is.

I have the following query

SELECT table_name  FROM information_schema.tables 
WHERE table_type = 'BASE TABLE'
order by table_name

and it lists a table AppFeature which I am not familiar with.
The table does not exist in my database

Why would it be listed in information_schema?
Should I try to remove it?

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

As Tibor points out, maybe it’s in a different schema than you thought, especially if it’s showing up in sys.Tables (which you should use instead of the INFORMATION_SCHEMA). You can get the schema name from sys.Tables with a query like this:

SELECT SCHEMA_NAME(schema_id) AS SchemaName, name AS TableName   
FROM sys.tables

Once you have the correct schema, you can try querying the table with the schema name prefixed to it, e.g. SELECT * FROM SchemaName.AppFeature.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply