Database 如何在postgresql上获取所有表名,但有异常?
我现在正在使用codeigniter,我想获得数据库postgres中所有表的名称。所以我使用Database 如何在postgresql上获取所有表名,但有异常?,database,postgresql,Database,Postgresql,我现在正在使用codeigniter,我想获得数据库postgres中所有表的名称。所以我使用selecttable_name FROM information_schema.tables WHERE table_schema='public' 它显示了所有表名,但我希望有一个表例外,不显示。我该怎么办 SELECT table_name FROM information_schema.tables WHERE table_schema='public' and table_name != '
selecttable_name FROM information_schema.tables WHERE table_schema='public'代码>
它显示了所有表名,但我希望有一个表例外,不显示。我该怎么办
SELECT table_name FROM information_schema.tables
WHERE table_schema='public' and table_name != 'nameOfTableYouWantToExcept';
这将检索除您之外的所有表名=代码>在表\u name
上显示:错误:列“”不存在