从数据库中获取 table 个名称,其中包含特定数据类型的列
Get table names from database, which contains particular data type column
我想从数据库中获取所有 Table Names
,其中 Table 有一个包含 particular DataType
的列。
假设图像是 DataType
,那么我想找到其中包含一列或多列图像类型的所有 Table 名称。
select * from information_schema.columns
添加 where DATA_TYPE = 'datatype'
以获取特定类型的列。
(这是 ANSI/ISO SQL 标准,并非所有 dbms 产品都支持。)
我想从数据库中获取所有 Table Names
,其中 Table 有一个包含 particular DataType
的列。
假设图像是 DataType
,那么我想找到其中包含一列或多列图像类型的所有 Table 名称。
select * from information_schema.columns
添加 where DATA_TYPE = 'datatype'
以获取特定类型的列。
(这是 ANSI/ISO SQL 标准,并非所有 dbms 产品都支持。)