Home > Net >  SQL query to get all the heading names under a specific schema name
SQL query to get all the heading names under a specific schema name

Time:10-19

SQL query to headings from 'Table' under a specific schema name.

Schema_name
      - Table

      - View

SELECT TABNAME FROM syscat.tables where tabschema = 'SCHEMA-NAME'

Above sql prints out all the tables names in both 'Table' and 'View' but I just want the table names under 'Table'

CodePudding user response:

Try using an additional filter

   WHERE TYPE = 'T'

this will limit your result to tables.

More details can be found here

  • Related