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..d22b194e23a 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. +`CREATE TAG` 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] +Running the `CREATE TAG` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) for the graph space. Otherwise, Nebula Graph throws an error. - ::= - [NULL | NOT NULL] +## Syntax - ::= -