diff --git a/media/sqlgram/ColumnName.png b/media/sqlgram/ColumnName.png index 86fcc2e9f476..2b8e612df13b 100644 Binary files a/media/sqlgram/ColumnName.png and b/media/sqlgram/ColumnName.png differ diff --git a/media/sqlgram/CreateDatabaseStmt.png b/media/sqlgram/CreateDatabaseStmt.png index 240bd250f569..61674d33ce7e 100644 Binary files a/media/sqlgram/CreateDatabaseStmt.png and b/media/sqlgram/CreateDatabaseStmt.png differ diff --git a/media/sqlgram/CreateIndexStmtUnique.png.bak b/media/sqlgram/CreateIndexStmtUnique.png.bak new file mode 100644 index 000000000000..0e408c1fe207 Binary files /dev/null and b/media/sqlgram/CreateIndexStmtUnique.png.bak differ diff --git a/media/sqlgram/DBName.png b/media/sqlgram/DBName.png index 065f275b7be4..263fefd9b460 100644 Binary files a/media/sqlgram/DBName.png and b/media/sqlgram/DBName.png differ diff --git a/media/sqlgram/DatabaseOptionList.png b/media/sqlgram/DatabaseOptionList.png new file mode 100644 index 000000000000..34f1a79dfb1c Binary files /dev/null and b/media/sqlgram/DatabaseOptionList.png differ diff --git a/media/sqlgram/DatabaseOptionListOpt.png b/media/sqlgram/DatabaseOptionListOpt.png index 3c73525b76cf..1a917e129dac 100644 Binary files a/media/sqlgram/DatabaseOptionListOpt.png and b/media/sqlgram/DatabaseOptionListOpt.png differ diff --git a/media/sqlgram/DeallocateStmt.png b/media/sqlgram/DeallocateStmt.png index a381eea0666d..11eec738506d 100644 Binary files a/media/sqlgram/DeallocateStmt.png and b/media/sqlgram/DeallocateStmt.png differ diff --git a/media/sqlgram/DeallocateSym.png b/media/sqlgram/DeallocateSym.png index e134763d93fc..e4ca48c3eabf 100644 Binary files a/media/sqlgram/DeallocateSym.png and b/media/sqlgram/DeallocateSym.png differ diff --git a/media/sqlgram/DropTableStmt.png b/media/sqlgram/DropTableStmt.png index fa4bb82d4fc6..1dfbb1d0a029 100644 Binary files a/media/sqlgram/DropTableStmt.png and b/media/sqlgram/DropTableStmt.png differ diff --git a/media/sqlgram/Identifier.png b/media/sqlgram/Identifier.png index c021b2d3fb3a..d8e4878c5d80 100644 Binary files a/media/sqlgram/Identifier.png and b/media/sqlgram/Identifier.png differ diff --git a/media/sqlgram/IfNotExists.png b/media/sqlgram/IfNotExists.png index 363cf2bbe865..4dab5ece5f98 100644 Binary files a/media/sqlgram/IfNotExists.png and b/media/sqlgram/IfNotExists.png differ diff --git a/media/sqlgram/IndexTypeOpt.png b/media/sqlgram/IndexTypeOpt.png index 5345a1ed32d8..907a75588b89 100644 Binary files a/media/sqlgram/IndexTypeOpt.png and b/media/sqlgram/IndexTypeOpt.png differ diff --git a/media/sqlgram/RestrictOrCascadeOpt.png b/media/sqlgram/RestrictOrCascadeOpt.png old mode 100644 new mode 100755 index 198ab814341b..c9d13ee8dd8c Binary files a/media/sqlgram/RestrictOrCascadeOpt.png and b/media/sqlgram/RestrictOrCascadeOpt.png differ diff --git a/media/sqlgram/TableNameList.png b/media/sqlgram/TableNameList.png old mode 100644 new mode 100755 index 2fd3076caa93..28abe8fbdbca Binary files a/media/sqlgram/TableNameList.png and b/media/sqlgram/TableNameList.png differ diff --git a/media/sqlgram/TableOrTables.png b/media/sqlgram/TableOrTables.png index aacd0694727b..d6718db6e598 100644 Binary files a/media/sqlgram/TableOrTables.png and b/media/sqlgram/TableOrTables.png differ diff --git a/sql-statements/sql-statement-alter-table.md b/sql-statements/sql-statement-alter-table.md index 7a3760be3941..513c1dcc024c 100644 --- a/sql-statements/sql-statement-alter-table.md +++ b/sql-statements/sql-statement-alter-table.md @@ -94,7 +94,7 @@ EXPLAIN SELECT * FROM t1 WHERE c1 = 3; ## MySQL 兼容性 -* 支持除空间类型外的所有数据类型。其它不支持的情况可参考:[alter-primary-key](/tidb-configuration-file.md#alter-primary-key)。 +* 支持除空间类型外的所有数据类型。其它不支持的情况可参考:[DDL 语句与 MySQL 的兼容性情况](/mysql-compatibility.md#ddl)。 ## 另请参阅 diff --git a/sql-statements/sql-statement-change-column.md b/sql-statements/sql-statement-change-column.md index e37067aabcd8..2608b421e353 100644 --- a/sql-statements/sql-statement-change-column.md +++ b/sql-statements/sql-statement-change-column.md @@ -19,10 +19,6 @@ aliases: ['/docs-cn/dev/reference/sql/statements/change-column/'] ![AlterTableSpec](/media/sqlgram/AlterTableSpec.png) -**ColumnKeywordOpt:** - -![ColumnKeywordOpt](/media/sqlgram/ColumnKeywordOpt.png) - **ColumnName:** ![ColumnName](/media/sqlgram/ColumnName.png) diff --git a/sql-statements/sql-statement-create-database.md b/sql-statements/sql-statement-create-database.md index 58058a55ce60..fc161aa3d7f2 100644 --- a/sql-statements/sql-statement-create-database.md +++ b/sql-statements/sql-statement-create-database.md @@ -13,11 +13,7 @@ aliases: ['/docs-cn/dev/reference/sql/statements/create-database/'] **CreateDatabaseStmt:** -![CreateDatabaseStmt](/media/sqlgram/CreateDatabaseStmt.png) - -**DatabaseSym:** - -![DatabaseSym](/media/sqlgram/DatabaseSym.png) +![CreateDaatabaseStmt](/media/sqlgram/CreateDatabaseStmt.png) **IfNotExists:** diff --git a/sql-statements/sql-statement-drop-column.md b/sql-statements/sql-statement-drop-column.md index 15319f6f6077..517b2567f822 100644 --- a/sql-statements/sql-statement-drop-column.md +++ b/sql-statements/sql-statement-drop-column.md @@ -19,10 +19,6 @@ aliases: ['/docs-cn/dev/reference/sql/statements/drop-column/'] ![AlterTableSpec](/media/sqlgram/AlterTableSpec.png) -**ColumnKeywordOpt:** - -![ColumnKeywordOpt](/media/sqlgram/ColumnKeywordOpt.png) - **ColumnName:** ![ColumnName](/media/sqlgram/ColumnName.png) @@ -129,7 +125,8 @@ SELECT * FROM t1; ## MySQL 兼容性 -* 不支持使用相同语句删除多个列。 +* 目前不支持在一条语句中同时删除多个列。 +* 目前不支持删除主键列或索引列。 ## 另请参阅 diff --git a/sql-statements/sql-statement-drop-table.md b/sql-statements/sql-statement-drop-table.md index c94b9a4a126d..17814d1c4697 100644 --- a/sql-statements/sql-statement-drop-table.md +++ b/sql-statements/sql-statement-drop-table.md @@ -90,6 +90,7 @@ Query OK, 0 rows affected (0.23 sec) ## MySQL 兼容性 * 在尝试删除不存在的表时,使用 `IF EXISTS` 删除表不会返回警告。[Issue #7867](https://github.com/pingcap/tidb/issues/7867) +* 目前 `RESTRICT` 和 `CASCADE` 仅在语法上支持。 ## 另请参阅