代码之家  ›  专栏  ›  技术社区  ›  Tom Juergens

MySQL中的系统视图

  •  1
  • Tom Juergens  · 技术社区  · 17 年前

    MySQL(5版)服务器是否有等效的函数/视图?

    2 回复  |  直到 17 年前
        1
  •  5
  •   Nelson Miranda    17 年前

    对于模式(所有对象);

    SELECT * FROM information_schema.SCHEMATA S;
    

    用于约束和外键;

    SELECT * FROM information_schema.TABLE_CONSTRAINTS T;
    

    对于其他所有内容,请检查此查询;

    SELECT * FROM information_schema.CHARACTER_SETS C;
    SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY C;
    SELECT * FROM information_schema.COLLATIONS C;
    SELECT * FROM information_schema.COLUMN_PRIVILEGES C;
    SELECT * FROM information_schema.`COLUMNS` C;
    SELECT * FROM information_schema.KEY_COLUMN_USAGE K;
    SELECT * FROM information_schema.PROFILING P;
    SELECT * FROM information_schema.ROUTINES R;
    SELECT * FROM information_schema.SCHEMA_PRIVILEGES S;  
    SELECT * FROM information_schema.STATISTICS S;
    SELECT * FROM information_schema.TABLE_PRIVILEGES T;
    SELECT * FROM information_schema.`TABLES` T;
    SELECT * FROM information_schema.TRIGGERS T;
    SELECT * FROM information_schema.USER_PRIVILEGES U;
    SELECT * FROM information_schema.VIEWS V;
    
        2
  •  1
  •   Powerlord    17 年前

    嗯,我还没有研究它包含的所有内容,但是里面有很多信息 information_schema show

    但是,我没有看到一个命令显示所有外键。