Find tables with digits in names

Query below finds all tables with digits in their names.

Query

SELECT  DatabaseName,
        TableName
FROM    DBC.TablesV
WHERE   TableKind = 'T'
AND     REGEXP_SIMILAR(TableName,'.*[0-9].*') = 1
ORDER BY    DatabaseName,
            TableName;

Columns

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

Rows

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

Sample results

List of tables with digits in their names.

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.