Skip to content

Commit d2657cd

Browse files
soyeric128BohuTANG
authored andcommitted
Update array-length.md
1 parent 09cdccc commit d2657cd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/en/sql-reference/20-sql-functions/00-array-functions/array-length.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ ARRAY_LENGTH( <array> )
1717
## Examples
1818

1919
```sql
20-
SELECT ARRAY_LENGTH([1, 2]), ARRAY_SIZE([1, 2]);
21-
22-
┌───────────────────────────────────────────┐
23-
│ array_length([1, 2]) │ array_size([1, 2]) │
24-
├──────────────────────┼────────────────────┤
25-
22
26-
└───────────────────────────────────────────┘
20+
SELECT
21+
ARRAY_LENGTH(['apple', 'banana', 'cherry']) AS item_count,
22+
ARRAY_SIZE(['apple', 'banana', 'cherry']) AS item_count_alias;
23+
24+
┌───────────────────────────────┐
25+
│ item_count │ item_count_alias │
26+
├────────────┼──────────────────┤
27+
33
28+
└───────────────────────────────┘
2729
```

0 commit comments

Comments
 (0)