• You're doing nothing wrong. This is the expected and documented behaviour for sys.tables.

    Note that this discussion is about the system stored procedure sp_tables, not about the catalog view sys.tables.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/