diff --git a/character-set-and-collation.md b/character-set-and-collation.md index 1b28a44e10870..ee8f3502535a4 100644 --- a/character-set-and-collation.md +++ b/character-set-and-collation.md @@ -147,8 +147,8 @@ The following demonstrates the default behavior when inserting a 4-byte emoji ch ```sql CREATE TABLE utf8_test ( - -> c char(1) NOT NULL - -> ) CHARACTER SET utf8; + c char(1) NOT NULL + ) CHARACTER SET utf8; ``` ```sql @@ -157,8 +157,8 @@ Query OK, 0 rows affected (0.09 sec) ```sql CREATE TABLE utf8m4_test ( - -> c char(1) NOT NULL - -> ) CHARACTER SET utf8mb4; + c char(1) NOT NULL + ) CHARACTER SET utf8mb4; ``` ```sql diff --git a/partitioned-table.md b/partitioned-table.md index c002a76dedfeb..7214fdbb1e383 100644 --- a/partitioned-table.md +++ b/partitioned-table.md @@ -360,13 +360,13 @@ Unlike Range partitioning, List partitioning does not have a similar `MAXVALUE` ```sql test> CREATE TABLE t ( - -> a INT, - -> b INT - -> ) - -> PARTITION BY LIST (a) ( - -> PARTITION p0 VALUES IN (1, 2, 3), - -> PARTITION p1 VALUES IN (4, 5, 6) - -> ); + a INT, + b INT + ) + PARTITION BY LIST (a) ( + PARTITION p0 VALUES IN (1, 2, 3), + PARTITION p1 VALUES IN (4, 5, 6) + ); Query OK, 0 rows affected (0.11 sec) test> INSERT INTO t VALUES (7, 7); @@ -1768,10 +1768,10 @@ In `static` mode, TiDB accesses each partition separately using multiple operato ```sql mysql> create table t1(id int, age int, key(id)) partition by range(id) ( - -> partition p0 values less than (100), - -> partition p1 values less than (200), - -> partition p2 values less than (300), - -> partition p3 values less than (400)); + partition p0 values less than (100), + partition p1 values less than (200), + partition p2 values less than (300), + partition p3 values less than (400)); Query OK, 0 rows affected (0.01 sec) mysql> explain select * from t1 where id < 150; @@ -1821,10 +1821,10 @@ From the above query results, you can see that the `Union` operator in the execu ```sql mysql> create table t1 (id int, age int, key(id)) partition by range(id) - -> (partition p0 values less than (100), - -> partition p1 values less than (200), - -> partition p2 values less than (300), - -> partition p3 values less than (400)); + (partition p0 values less than (100), + partition p1 values less than (200), + partition p2 values less than (300), + partition p3 values less than (400)); Query OK, 0 rows affected (0,08 sec) mysql> create table t2 (id int, code int); diff --git a/sql-statements/sql-statement-create-binding.md b/sql-statements/sql-statement-create-binding.md index 56783c8d22534..fcf3dc8ce70d8 100644 --- a/sql-statements/sql-statement-create-binding.md +++ b/sql-statements/sql-statement-create-binding.md @@ -38,11 +38,11 @@ The following example shows how to create a binding according to a SQL statement ```sql mysql> CREATE TABLE t1 ( - -> id INT NOT NULL PRIMARY KEY auto_increment, - -> b INT NOT NULL, - -> pad VARBINARY(255), - -> INDEX(b) - -> ); + id INT NOT NULL PRIMARY KEY auto_increment, + b INT NOT NULL, + pad VARBINARY(255), + INDEX(b) + ); Query OK, 0 rows affected (0.07 sec) mysql> INSERT INTO t1 SELECT NULL, FLOOR(RAND()*1000), RANDOM_BYTES(255) FROM dual; @@ -95,9 +95,9 @@ mysql> EXPLAIN ANALYZE SELECT * FROM t1 WHERE b = 123; 3 rows in set (0.02 sec) mysql> CREATE SESSION BINDING FOR - -> SELECT * FROM t1 WHERE b = 123 - -> USING - -> SELECT * FROM t1 IGNORE INDEX (b) WHERE b = 123; + SELECT * FROM t1 WHERE b = 123 + USING + SELECT * FROM t1 IGNORE INDEX (b) WHERE b = 123; Query OK, 0 rows affected (0.00 sec) mysql> EXPLAIN ANALYZE SELECT * FROM t1 WHERE b = 123; diff --git a/sql-statements/sql-statement-create-table.md b/sql-statements/sql-statement-create-table.md index e72753b914345..ecaf89fd5bf0c 100644 --- a/sql-statements/sql-statement-create-table.md +++ b/sql-statements/sql-statement-create-table.md @@ -221,9 +221,9 @@ mysql> DROP TABLE IF EXISTS t1; Query OK, 0 rows affected (0.22 sec) mysql> CREATE TABLE IF NOT EXISTS t1 ( - -> id BIGINT NOT NULL PRIMARY KEY auto_increment, - -> b VARCHAR(200) NOT NULL - -> ); + id BIGINT NOT NULL PRIMARY KEY auto_increment, + b VARCHAR(200) NOT NULL + ); Query OK, 0 rows affected (0.08 sec) mysql> DESC t1; diff --git a/sql-statements/sql-statement-drop-binding.md b/sql-statements/sql-statement-drop-binding.md index 804803b81bcd7..b240e6293ea3a 100644 --- a/sql-statements/sql-statement-drop-binding.md +++ b/sql-statements/sql-statement-drop-binding.md @@ -34,11 +34,11 @@ The following example shows how to remove a binding according to a SQL statement ```sql mysql> CREATE TABLE t1 ( - -> id INT NOT NULL PRIMARY KEY auto_increment, - -> b INT NOT NULL, - -> pad VARBINARY(255), - -> INDEX(b) - -> ); + id INT NOT NULL PRIMARY KEY auto_increment, + b INT NOT NULL, + pad VARBINARY(255), + INDEX(b) + ); Query OK, 0 rows affected (0.07 sec) mysql> INSERT INTO t1 SELECT NULL, FLOOR(RAND()*1000), RANDOM_BYTES(255) FROM dual; @@ -91,9 +91,9 @@ mysql> EXPLAIN ANALYZE SELECT * FROM t1 WHERE b = 123; 3 rows in set (0.02 sec) mysql> CREATE SESSION BINDING FOR - -> SELECT * FROM t1 WHERE b = 123 - -> USING - -> SELECT * FROM t1 IGNORE INDEX (b) WHERE b = 123; + SELECT * FROM t1 WHERE b = 123 + USING + SELECT * FROM t1 IGNORE INDEX (b) WHERE b = 123; Query OK, 0 rows affected (0.00 sec) mysql> EXPLAIN ANALYZE SELECT * FROM t1 WHERE b = 123; diff --git a/sql-statements/sql-statement-show-bindings.md b/sql-statements/sql-statement-show-bindings.md index 4fe2548dd6d77..53d2dcb001e76 100644 --- a/sql-statements/sql-statement-show-bindings.md +++ b/sql-statements/sql-statement-show-bindings.md @@ -54,11 +54,11 @@ This statement outputs the execution plan bindings at the GLOBAL or SESSION leve ```sql mysql> CREATE TABLE t1 ( - -> id INT NOT NULL PRIMARY KEY auto_increment, - -> b INT NOT NULL, - -> pad VARBINARY(255), - -> INDEX(b) - -> ); + id INT NOT NULL PRIMARY KEY auto_increment, + b INT NOT NULL, + pad VARBINARY(255), + INDEX(b) + ); Query OK, 0 rows affected (0.07 sec) mysql> INSERT INTO t1 SELECT NULL, FLOOR(RAND()*1000), RANDOM_BYTES(255) FROM dual; @@ -111,9 +111,9 @@ mysql> EXPLAIN ANALYZE SELECT * FROM t1 WHERE b = 123; 3 rows in set (0.02 sec) mysql> CREATE SESSION BINDING FOR - -> SELECT * FROM t1 WHERE b = 123 - -> USING - -> SELECT * FROM t1 IGNORE INDEX (b) WHERE b = 123; + SELECT * FROM t1 WHERE b = 123 + USING + SELECT * FROM t1 IGNORE INDEX (b) WHERE b = 123; Query OK, 0 rows affected (0.00 sec) mysql> EXPLAIN ANALYZE SELECT * FROM t1 WHERE b = 123; diff --git a/tidb-cloud/migrate-sql-shards.md b/tidb-cloud/migrate-sql-shards.md index 5d996a5ff4290..7d8fb24360aa3 100644 --- a/tidb-cloud/migrate-sql-shards.md +++ b/tidb-cloud/migrate-sql-shards.md @@ -125,12 +125,12 @@ In this example, the column IDs of the upstream tables `sale_01` and `sale_02` a ```sql mysql> CREATE TABLE `sales` ( - -> `id` bigint(20) NOT NULL , - -> `uid` varchar(40) NOT NULL, - -> `sale_num` bigint DEFAULT NULL, - -> INDEX (`id`), - -> UNIQUE KEY `ind_uid` (`uid`) - -> ); + `id` bigint(20) NOT NULL , + `uid` varchar(40) NOT NULL, + `sale_num` bigint DEFAULT NULL, + INDEX (`id`), + UNIQUE KEY `ind_uid` (`uid`) + ); Query OK, 0 rows affected (0.17 sec) ``` @@ -406,7 +406,7 @@ The TiDB Cloud console does not provide any feature about incremental data repli host: "tidb.xxxxxxx.xxxxxxxxx.ap-northeast-1.prod.aws.tidbcloud.com" port: 4000 user: "root" - password: "${password}" # If the password is not empty, it is recommended to use a dmctl-encrypted cipher. + password: "${password}" # If the password is not empty, it is recommended to use a dmctl-encrypted cipher. ## ******** Function Configuration ********** routes: diff --git a/transaction-overview.md b/transaction-overview.md index 3f5860cc0e80b..e12e891f22dcf 100644 --- a/transaction-overview.md +++ b/transaction-overview.md @@ -92,9 +92,9 @@ For example: ```sql mysql> CREATE TABLE t1 ( - -> id INT NOT NULL PRIMARY KEY auto_increment, - -> pad1 VARCHAR(100) - -> ); + id INT NOT NULL PRIMARY KEY auto_increment, + pad1 VARCHAR(100) + ); Query OK, 0 rows affected (0.09 sec) mysql> SELECT @@autocommit; @@ -132,9 +132,9 @@ Autocommit will not apply if a transaction has been explicitly started. In the f ```sql mysql> CREATE TABLE t2 ( - -> id INT NOT NULL PRIMARY KEY auto_increment, - -> pad1 VARCHAR(100) - -> ); + id INT NOT NULL PRIMARY KEY auto_increment, + pad1 VARCHAR(100) + ); Query OK, 0 rows affected (0.10 sec) mysql> SELECT @@autocommit;