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
demandé il y a 10 mois225 vues
1 réponse
2
Réponse acceptée

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
répondu il y a 10 mois
  • yes, i can get tables use single quote: SELECT table_name, table_schema, table_type FROM information_schema.tables where table_schema='xx.yy'

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions