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
已提問 10 個月前檢視次數 225 次
1 個回答
2
已接受的答案

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
已回答 10 個月前
  • yes, i can get tables use single quote: SELECT table_name, table_schema, table_type FROM information_schema.tables where table_schema='xx.yy'

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南