Skip to main content

How to check the List of Tables in particular schema in HP Vertica ???

  • July 29, 2013
  • 3 replies
  • 12 views

Syed_Mohammad_M
Forum|alt.badge.img+1
How to check the List of Tables in particular schema in HP Vertica ??? The below Oracle query is not working with HP Vertica: SELECT TABLE_NAME FROM ALL_TABLES WHERE OWNER='VMartDB'

3 replies

Forum|alt.badge.img+2
  • Participating Frequently
  • July 30, 2013
Hi Syed, Vertica supports standard SQL but does not necessarily provide the same system tables as any particular other database. Vertica's system tables are listed in our documentation. Here's a direct link: https://my.vertica.com/docs/6.1.x/HTML/index.htm#12288.htm In particular, you probably want to select from "TABLES", rather than "ALL_TABLES". Or "COLUMNS", rather than "ALL_TAB_COLUMNS", per your other recent post. As Ravi noted in a third one of your posts, we also support a bunch of vsql shortcuts for accessing this sort of information. You can see the full list of shortcuts by typing "\?" at a vsql prompt. These only work in vsql; if you're using ODBC/JDBC/etc, you'll have to use the system tables above. It sounds like you're generally new to Vertica? We are very similar to other SQL databases in some ways, but not identical. Some of our training courses might help you to understand the differences; see: http://www.vertica.com/customer-experience/12573-2/ Adam

Navin_C
Forum|alt.badge.img+2
  • Participating Frequently
  • July 30, 2013
Hello Syed, Select table_name from tables where owner_name='syed'; OR \dt

saumya_tamma
Forum|alt.badge.img+1
  • Participating Frequently
  • January 10, 2014
Hi,

You can use the following

select table_name from tables where table_schema='syed'

thanks
Saumya