Wednesday, April 27

Get a list of all the Tables in a Database

Script follows, with little to no fanfare!


SELECT
        
schemas.name + '.' + tables.name SchemaTableName
FROM
        
sys.tables
  
JOIN
        
sys.schemas
    
ON tables.schema_id = schemas.schema_id