gpt4 book ai didi

mysql - MySQL 中的系统 View

转载 作者:行者123 更新时间:2023-11-29 04:32:05 27 4
gpt4 key购买 nike

我正在使用 SYS.ALL_ OBJECTS、SYS.FOREIGN_KEYS 等系统目录 View 来获取有关我在 MS SQL 2005 中的数据库结构的信息。

MySQL (v. 5) 服务器是否有等效的功能/ View ?

最佳答案

对于架构(所有对象);

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;

关于mysql - MySQL 中的系统 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/284418/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com