首页 > 解决方案 > 如何在所有表 postgress 中找到一个值

问题描述

假设有这个词 'student' ,我需要返回所有包含 'student' 词的表。我需要这样的东西:

select *
from information_schema.tables t 
where column ='student';

任何人都可以帮助我吗?

标签: mysqlsqlpostgresql

解决方案


如果你想要表格,你会使用:

select *
from information_schema.tables t 
where table_name like '%student%';

如果您想要columns,您将使用正确的元数据表并使用:

select *
from information_schema.columns c
where column_name like '%student%';

推荐阅读