show all tables in DB2 using the LIST command

后端 未结 6 708
天涯浪人
天涯浪人 2021-01-31 09:26

This is embarrassing, but I can\'t seem to find a way to list the names of the tables in our DB2 database. Here is what I tried:

root@VO11555:~# su - db2inst1
ro         


        
6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 10:18

    Run this command line on your preferred shell session:

    db2 "select tabname from syscat.tables where owner = 'DB2INST1'"
    

    Maybe you'd like to modify the owner name, and need to check the list of current owners?

    db2 "select distinct owner from syscat.tables"
    

提交回复
热议问题