我可以在 MySQL 中创建 table 并直接在 information_schema table 中添加列吗

Can I create table in MySQL with adding columns in information_schema table directly

是否有机会通过查询 infirmation_schema 创建 table 而没有
create table ... ?
感谢您的回答。

without create table ...???

简单回答CREATE TABLE 语句的唯一目的是创建数据库 table。一般 CREATE Object 语句用于创建数据库对象。除非您开发自己的 RDBMS 产品,否则没有其他替代方法。

如果您感到困惑,请阅读 Documentation 并清楚地说明

INFORMATION_SCHEMA provides access to database metadata, information about the MySQL server such as the name of a database or table, the data type of a column, or access privileges.

是的,它是只读的。

它叫做 information_schema 而不是 create_schema。所以你只能在那里阅读信息。

当然可以,Information_schema 数据库是只读的。 但在 MySQL 中,视图未排序。例如在此 DDL 中:"create view q1 as select a.* from q2 as a inner join t1 as b on a.col1=b.col1"。 如果不创建第一个 q2,则无法创建 q1。如果从 information.views 中提取 DDL,则 Q1 DDL 位于 Q2 DDL 之前。 要简单地解决这个问题,我们只需要在 table information_schema.views 或 table information_schema.innodb_sys_tables.

中添加一列 auto_increment