Find tables with specific word in name

Query below finds tables with word 'Customer' in the name.

Query

SELECT  DatabaseName,
        TableName
FROM    DBC.TablesV
WHERE   TableKind = 'T'
AND     TableName LIKE '%Customer%'
ORDER BY    TableName;

Columns

  • DatabaseName - name of database table was found in
  • TableName - name of found table

Rows

  • One row represents a table
  • Scope of rows: all found tables
  • Ordered by database and table name

Sample results