| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- String Function and Operators
- Date and Time Functions
- String Functions and Operators
- Date and Time Function
- MySQL
- Oracle
- 전자정부표준프레임워크
- HTTP
- 방화벽
- 전자정부 표준프레임워크
- 오라클
- Tibero
- 티베로
- Data and Time Functions
- String Functions and Date Operators
- 윈도우
- SVN
- Sring Functions and Operators
- Today
- Total
웹이야기
[MySQL] MAKE_SET() 본문
MySQL 문자열 함수와 연산자
MAKE_SET()
-
MAKE_SET(bits, str1, str2, ...)
의 형태
Returns a set value(a string containing substrings separated by , characters) consisting of the strings that have the corresponding bit in bits set. str1 correspondes to bit 0, str2 to bit 1, and so on. NULL values in str1, str2, ... are not appended to the result.
mysql> SELECT MAKE_SET(1, 'a', 'b', 'c') ;
+----------------------------+
| MAKE_SET(1, 'a', 'b', 'c') |
+----------------------------+
| a |
+----------------------------+
1 row in set (0.00 sec)
mysql> SELECT MAKE_SET(1 | 4, 'hello', 'nice', 'world') ;
+-------------------------------------------+
| MAKE_SET(1 | 4, 'hello', 'nice', 'world') |
+-------------------------------------------+
| hello,world |
+-------------------------------------------+
1 row in set (0.00 sec)
mysql> SELECT MAKE_SET(1 | 3, 'hello', 'nice',NULL, 'world') ;
+------------------------------------------------+
| MAKE_SET(1 | 3, 'hello', 'nice',NULL, 'world') |
+------------------------------------------------+
| hello,nice |
+------------------------------------------------+
mysql> SELECT MAKE_SET(0, 'a', 'b', 'c') ;
+----------------------------+
| MAKE_SET(0, 'a', 'b', 'c') |
+----------------------------+
| |
+----------------------------+
1 row in set (0.00 sec)
'D > MySQL' 카테고리의 다른 글
| [MySQL] OCT() (0) | 2020.04.14 |
|---|---|
| [MySQL] MID() (0) | 2020.04.14 |
| [MySQL] LTRIM() (0) | 2020.04.14 |
| [MySQL] LPAD() (0) | 2020.04.14 |
| [MySQL] LOWER() (0) | 2020.04.14 |