What is the best way to get the names of all of the tables in a specific database on SQL Server?
Please use this. You will get table names along with schema names:
SELECT SYSSCHEMA.NAME, SYSTABLE.NAME FROM SYS.tables SYSTABLE INNER JOIN SYS.SCHEMAS SYSSCHEMA ON SYSTABLE.SCHEMA_ID = SYSSCHEMA.SCHEMA_ID