类似于 Mysql's information_schema.tables, HoraeDB 提供 system.public.tables 存储表信息。
system.public.tables 表的列如下 :
通过表名查询表信息示例如下:
curl --location --request POST 'http://localhost:5000/sql' \ --header 'Content-Type: application/json' \ -d '{ "query": "select * from system.public.tables where `table_name`=\"my_table\"" }'
返回结果
{ "rows":[ { "timestamp":0, "catalog":"horaedb", "schema":"public", "table_name":"my_table", "table_id":3298534886446, "engine":"Analytic" } }