6

在 postgresql 中,可以通过运行以下查询来获得所有表名

SELECT table_name FROM information_schema.tables WHERE table_schema='public';

在 monetdb 中是否有类似的东西来获得表格列表?

4

2 回答 2

12

我终于找到了这个查询

select tables.name from tables where tables.system=false ;
于 2014-04-11T08:57:14.480 回答
12

如果您使用 mclient,在命令行中您可以简单地使用命令“\d”列出当前数据库中的所有表。

sql> \d

TABLE  sys.table1 

TABLE  sys.table2

TABLE  sys.table3

此外,使用命令“\d tablename”查看表的元数据 - 相当于 mysql 中的“show create table”。

于 2014-10-25T13:40:08.883 回答