How to show tables in schema like "xx.yy"

0

I can query data of table in schema "xx.yy" successfully by quoting the schema:
SELECT * FROM "xx.yy"."testtable" limit 10;

But I can not show tables in this schema by running:
show tables in xx.yy
Error: Catalog 'xx' does not exist

or show tables in "xx.yy"
Error: mismatched input '"xx.yy"' expecting {'SELECT', 'FROM'.......

Could you please help to provide me the sql to show tables in schema "xx.yy"?

Jinlei
gefragt vor 9 Monaten211 Aufrufe
1 Antwort
2
Akzeptierte Antwort

In order to get all the tables in schema "xx.yy", please write the query in following manner: SELECT table_name, table_schema, table_type FROM information_schema.tables where table_schema="xx.yy"

This should help you in getting the desired information.

AWS
beantwortet vor 9 Monaten
  • yes, i can get tables use single quote: SELECT table_name, table_schema, table_type FROM information_schema.tables where table_schema='xx.yy'

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen