Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TOC-tidb-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@
- [Expression Syntax](/expression-syntax.md)
- [Comment Syntax](/comment-syntax.md)
- SQL Statements
- [Overview](/sql-statements/sql-statement-overview.md)
- [`ADD COLUMN`](/sql-statements/sql-statement-add-column.md)
- [`ADD INDEX`](/sql-statements/sql-statement-add-index.md)
- [`ADMIN`](/sql-statements/sql-statement-admin.md)
Expand Down
1 change: 1 addition & 0 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@
- [Expression Syntax](/expression-syntax.md)
- [Comment Syntax](/comment-syntax.md)
- SQL Statements
- [Overview](/sql-statements/sql-statement-overview.md)
- [`ADD COLUMN`](/sql-statements/sql-statement-add-column.md)
- [`ADD INDEX`](/sql-statements/sql-statement-add-index.md)
- [`ADMIN`](/sql-statements/sql-statement-admin.md)
Expand Down
2 changes: 1 addition & 1 deletion basic-sql-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To experiment with SQL and test out TiDB compatibility with MySQL queries, you c

</CustomContent>

This page walks you through the basic TiDB SQL statements such as DDL, DML and CRUD operations. For a complete list of TiDB statements, see [TiDB SQL Syntax Diagram](https://pingcap.github.io/sqlgram/).
This page walks you through the basic TiDB SQL statements such as DDL, DML and CRUD operations. For a complete list of TiDB statements, see [TiDB SQL Syntax](/sql-statements/sql-statement-overview.md)).

## Category

Expand Down
4 changes: 3 additions & 1 deletion develop/dev-guide-create-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ CREATE TABLE `bookshop`.`ratings` (
);
```

In addition, if the current time is also filled in by default when the data is being updated, the following statements can be used (but only the [current time related statements](https://pingcap.github.io/sqlgram/#NowSymOptionFraction) can be filled in after `ON UPDATE`, and [more options](https://pingcap.github.io/sqlgram/#DefaultValueExpr) are supported after `DEFAULT`):
In addition, if the current time is also filled in by default when the data is being updated, the following statements can be used (but only the current-time related expressions can be filled in after `ON UPDATE`):

```sql
CREATE TABLE `bookshop`.`ratings` (
Expand All @@ -195,6 +195,8 @@ CREATE TABLE `bookshop`.`ratings` (
);
```

For more information on default values of different data types, see [default values](/data-type-default-values.md).

### Prevent duplicate values

If you need to prevent duplicate values in a column, you can use the `UNIQUE` constraint.
Expand Down
4 changes: 2 additions & 2 deletions develop/dev-guide-tidb-crud-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ TiDB is compatible with MySQL, you can use MySQL statements directly in most cas

To experiment with SQL and test out TiDB compatibility with MySQL queries, you can try [TiDB Playground](https://play.tidbcloud.com/?utm_source=docs&utm_medium=basic-sql-operations). You can also first deploy a TiDB cluster and then run SQL statements in it.

This page walks you through the basic TiDB SQL statements such as DDL, DML, and CRUD operations. For a complete list of TiDB statements, see [TiDB SQL Syntax Diagram](https://pingcap.github.io/sqlgram/).
This page walks you through the basic TiDB SQL statements such as DDL, DML, and CRUD operations. For a complete list of TiDB statements, see [SQL Statement Overview](/sql-statements/sql-statement-overview.md).

## Category

Expand All @@ -35,7 +35,7 @@ SQL is divided into the following 4 types according to their functions:

- **DCL (Data Control Language)**: It is used to define access privileges and security levels.

The following mainly introduces DML and DQL. For more information about DDL and DCL, see [Explore SQL with TiDB](/basic-sql-operations.md) or [TiDB SQL syntax detailed explanation](https://pingcap.github.io/sqlgram/).
The following mainly introduces DML and DQL. For more information about DDL and DCL, see [Explore SQL with TiDB](/basic-sql-operations.md) or [SQL Statement Overview](/sql-statements/sql-statement-overview.md).

## Data Manipulation Language

Expand Down
2 changes: 1 addition & 1 deletion expression-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The expressions can be divided into the following types:

- ParamMarker (`?`), system variables, user variables and CASE expressions.

The following rules are the expression syntax, which is based on the [`parser.y`](https://github.com/pingcap/tidb/blob/release-8.1/pkg/parser/parser.y) rules of TiDB parser. For the navigable version of the following syntax diagram, refer to [TiDB SQL Syntax Diagram](https://pingcap.github.io/sqlgram/#Expression).
The following rules are the expression syntax, which is based on the [`parser.y`](https://github.com/pingcap/tidb/blob/release-8.1/pkg/parser/parser.y) rules of TiDB parser.

```ebnf+diagram
Expression ::=
Expand Down
4 changes: 1 addition & 3 deletions mysql-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ For more information, refer to [Understand the Query Execution Plan](/explain-ov

### Built-in functions

TiDB supports most of the built-in functions in MySQL, but not all. You can use the statement `SHOW BUILTINS` to get a list of the available functions.

For more information, refer to the [TiDB SQL Grammar](https://pingcap.github.io/sqlgram/#functioncallkeyword).
TiDB supports most of the built-in functions in MySQL, but not all. You can use the statement [`SHOW BUILTINS`](/sql-statements/sql-statement-show-builtins.md) to get a list of the available functions.

### DDL operations

Expand Down
Loading