Skip to content

Commit

Permalink
Replace sqlgram links (#17468)
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden authored May 27, 2024
1 parent 97749e6 commit 9401288
Show file tree
Hide file tree
Showing 8 changed files with 345 additions and 8 deletions.
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 @@ -719,6 +719,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 @@ -14,7 +14,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 @@ -18,7 +18,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/master/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/master/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 @@ -157,9 +157,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

0 comments on commit 9401288

Please sign in to comment.