| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
- SVN
- String Functions and Operators
- String Function and Operators
- Oracle
- Date and Time Function
- HTTP
- Tibero
- String Functions and Date Operators
- 윈도우
- Data and Time Functions
- Sring Functions and Operators
- 전자정부 표준프레임워크
- MySQL
- 방화벽
- 전자정부표준프레임워크
- 오라클
- Date and Time Functions
- 티베로
- Today
- Total
웹이야기
[MySQL] HEX() 본문
MySQL 문자열 함수와 연산자
HEX()
-
HEX(str)
HEX(N)
의 형태
For a string argument str, HEX() returns a hexadecimal string representation of str where each byte of each character in str is converted to two hexadecimal digits. (Multibyte characters therefore become more than two digits.) The inverse of this operation is performed by UNHEX() function.
For a numeric argument N, HEX() returns a hdxadecimal string representation of the value of N treated as a longlong(BIGINT) number. This is equivalent to CONV(N, 10, 16). The inverse of this operation is performed by CONV(HEX(N), 16, 10).
mysql> SELECT X'616263', HEX('abc'), UNHEX(HEX('abc'));
+-----------+------------+-------------------+
| X'616263' | HEX('abc') | UNHEX(HEX('abc')) |
+-----------+------------+-------------------+
| abc | 616263 | abc |
+-----------+------------+-------------------+
1 row in set (0.00 sec)
mysql> SELECT HEX(255), CONV(HEX(255), 16, 10) ;
+----------+------------------------+
| HEX(255) | CONV(HEX(255), 16, 10) |
+----------+------------------------+
| FF | 255 |
+----------+------------------------+
1 row in set (0.00 sec)
'D > MySQL' 카테고리의 다른 글
| [MySQL] INSTR() (0) | 2020.04.13 |
|---|---|
| [MySQL] INSERT() (0) | 2020.04.13 |
| MySQL FROM_BASE64() (0) | 2020.04.13 |
| [MySQL] FORMAT() (0) | 2020.04.13 |
| [MySQL] FIND_IN_SET() (0) | 2020.04.10 |