Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database 如何在postgresql上获取所有表名,但有异常?_Database_Postgresql - Fatal编程技术网

Database 如何在postgresql上获取所有表名,但有异常?

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 != '

我现在正在使用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 != 'nameOfTableYouWantToExcept';
这将检索除您
之外的所有表名=
表\u name
上显示:错误:列“”不存在