Find tables with names with specific suffix

Query below finds tables which names end with specific sufix, e.g. tables with names ending with 'Tab'.

Query

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

Columns

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

Rows

  • One row represents one table
  • Scope of rows: all found tables
  • Ordered by table name

Sample results

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.