Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的数据库中有大约 300 个表。我想要包含 sname、dtcreatedat、dtmodifiedat、ixlastmodifiedby 和 fstatus 列的表名。目前我正在手动检查每个表。在 mysql 中可以使用哪个命令来执行此操作?
您可以找到包含该列的所有表:
select distinct table_name from information_schema.columns where column_name in ('sname','dtcreatedat','dtmodifiedat','ixlastmodifiedby','fstatus') and table_schema = 'your_db_name'