Skip to content

Commit

Permalink
Update 3.alter-tag.md (#2025)
Browse files Browse the repository at this point in the history
  • Loading branch information
abby-cyber authored Mar 23, 2023
1 parent 26d52f2 commit 2ba2a2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- The property name must be unique in a tag. If you add a property with the same name as an existing property or a dropped property, the operation fails.

- Only the length of a `FIXED_STRING` or an `INT` can be increased.
- Only the length of a `FIXED_STRING` or an `INT` can be increased. The length of a `STRING` or an `INT` cannot be decreased.

- Only the data type conversions from FIXED_STRING to STRING and from FLOAT to DOUBLE are allowed.

Expand Down Expand Up @@ -42,12 +42,12 @@ ttl_definition:

```ngql
nebula> CREATE TAG IF NOT EXISTS t1 (p1 string, p2 int);
nebula> ALTER TAG t1 ADD (p3 int, p4 string);
nebula> ALTER TAG t1 ADD (p3 int32, fixed_string(10));
nebula> ALTER TAG t1 TTL_DURATION = 2, TTL_COL = "p2";
nebula> ALTER TAG t1 COMMENT = 'test1';
nebula> ALTER TAG t1 ADD (p5 double NOT NULL DEFAULT 0.4 COMMENT 'p5') COMMENT='test2';
// Change the `p3` property to INT8
nebula> ALTER TAG t1 CHANGE (p3 int8, p4 string);
// Change the data type of p3 in the TAG t1 from INT32 to INT64, and that of p4 from FIXED_STRING(10) to STRING.
nebula> ALTER TAG t1 CHANGE (p3 int64, p4 string);
[ERROR(-1005)]: Unsupported!
```

Expand Down

0 comments on commit 2ba2a2d

Please sign in to comment.