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.
我添加了一个关于 COLUMN_NAME 搜索的大部分已解决问题的问题,但尚未收到任何反馈。
如何进行如下查询:
我想查看列名称为“Type_ID”并且 必须是该表的主键的所有表。
SELECT table_schema, table_name FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE (table_schema, column_name, constraint_name) = ('mydatabase', 'Type_ID', 'PRIMARY');