New answers tagged system-tables
Whether using dbo or not, always specify the schema prefix explicitly. Otherwise, if you have users with different default schemas, you could end up with objects in a schema you didn't expect. One user creates a table in one schema, and the other can't see it. Here is a quick example: CREATE SCHEMA floob AUTHORIZATION dbo; GO CREATE USER blat1 WITHOUT ...
You should check the default schema of the user through which you are deleting the table. The table existing should be in another schema and the table being deleted is in the default schema of the user.
Objects like sys.objects, sys.tables or sys.columns contain information about database objects, tables and columns. But as you noted, that do not contain information about system objects. Most of these system views however can be prefixed with system_. So SELECT * FROM sys.system_columns AS SC; returns all the columns that are part of system tables in ...
Since you are on SQL Server 2012, best is to use the new DMF sys.dm_exec_describe_first_result_set. This dmf will take a transact-SQL statement as a parameter and describes the metadata of the first result set for the statement. so for example, you want to find out the columns names along with the datatypes and precison for sys.database_files, simply use ...
Top 50 recent answers are included