From c64326201f1e3d6095958eb6218ec6aded240d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=99=93=E9=9D=92?= <86282370+izhuxiaoqing@users.noreply.github.com> Date: Tue, 10 Aug 2021 17:59:20 +0800 Subject: [PATCH 1/4] tag statements --- .../10.tag-statements/1.create-tag.md | 111 ++++++------------ .../10.tag-statements/2.drop-tag.md | 39 +++--- .../10.tag-statements/3.alter-tag.md | 33 +++--- .../10.tag-statements/4.show-tags.md | 11 +- .../10.tag-statements/5.describe-tag.md | 31 ++--- 5 files changed, 102 insertions(+), 123 deletions(-) diff --git a/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md b/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md index 438b369b522..89c0d1d78af 100644 --- a/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md +++ b/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md @@ -1,107 +1,70 @@ # CREATE TAG -`CREATE TAG` creates a tag with the given name in a graph space. You must have the `CREATE` [privilege](../../7.data-security/1.authentication/3.role-list.md) for the graph space. To create a tag in a specific graph space, you must use the graph space first. +The `CREATE TAG` statement creates a tag with the given name in a graph space. ## OpenCypher compatibility -Tags in nGQL are similar with labels in openCypher. But they are also quite different. For example, the ways to create them are different. +Tags in nGQL are similar to labels in openCypher. But they are also quite different. For example, the ways to create them are different. -* In openCypher, labels are created together with nodes by `CREATE` statements. -* In nGQL, tags are created separately by `CREATE TAG` statements. Tags in nGQL are more like tables in MySQL. +* In openCypher, labels are created together with vertices in `CREATE` statements. +* In nGQL, tags are created separately using `CREATE TAG` statements. Tags in nGQL are more like tables in MySQL. -## Syntax +## Prerequisites -```ngql -CREATE TAG [IF NOT EXISTS] - ([, ...]) - [tag_options] +To run the `CREATE TAG` statement, you must have the [privilege](../../7.data-security/1.authentication/3.role-list.md) for the specified graph space. Otherwise, Nebula Graph throws an error. - ::= - [NULL | NOT NULL] +## Syntax - ::= -