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
asked 9 months ago204 views
1 Answer
2
Accepted Answer

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
answered 9 months ago
  • yes, i can get tables use single quote: SELECT table_name, table_schema, table_type FROM information_schema.tables where table_schema='xx.yy'

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions