Skip to content

Commit

Permalink
Add example for multi argument CHAR() (#16957)
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden authored Apr 15, 2024
1 parent 36427f3 commit c3369b4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion functions-and-operators/string-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ SELECT CustomerName, BIT_LENGTH(CustomerName) AS BitLengthOfName FROM Customers;
### [`CHAR()`](https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_char)

The `CHAR()` function is used to get the corresponding character of a specific ASCII value. It performs the opposite operation of `ASCII()`, which returns the ASCII value of a specific character.
The `CHAR()` function is used to get the corresponding character of a specific ASCII value. It performs the opposite operation of `ASCII()`, which returns the ASCII value of a specific character. If multiple arguments are supplied, the function works on all arguments and are then concaternated together.

Examples:

Expand Down Expand Up @@ -188,6 +188,19 @@ SELECT CHAR(50089);
+--------------+
```

```sql
SELECT CHAR(65,66,67);
```

```
+----------------+
| CHAR(65,66,67) |
+----------------+
| ABC |
+----------------+
1 row in set (0.00 sec)
```

### [`CHAR_LENGTH()`](https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_char-length)

The `CHAR_LENGTH()` function is used to get the total number of characters in a given argument as an integer.
Expand Down

0 comments on commit c3369b4

Please sign in to comment.