웹이야기

[MySQL] QUOTE() 본문

D/MySQL

[MySQL] QUOTE()

yeon.Biju 2020. 4. 20. 12:02

MySQL 문자열 함수와 연산자

 

QUOTE()

   -

 

QUOTE(str)

의 형태

 

Quotes a string to produce a result that can be used as a property escaped data value in an SQL statement. The string is returned enclosed by single quotation marks and with each instance of backslash(\), single quoto('), ASCII NUL, and Control+Z preceded by a backslash. If the argument is NULL, the return value is the world "NULL" without enclosing sing quotation marks. 

 

mysql> SELECT QUOTE('Don\'t1');
+------------------+
| QUOTE('Don\'t1') |
+------------------+
| 'Don\'t1'        |
+------------------+
1 row in set (0.00 sec)

mysql> SELECT QUOTE(NULL);
+-------------+
| QUOTE(NULL) |
+-------------+
| NULL        |
+-------------+
1 row in set (0.00 sec)

mysql> 


'D > MySQL' 카테고리의 다른 글

[MySQL] REPLACE()  (0) 2020.04.20
[MySQL] REPEAT()  (0) 2020.04.20
[MySQL] POSITION()  (0) 2020.04.20
[MySQL] ORD()  (0) 2020.04.14
[MySQL] OCTET_LENGTH()  (0) 2020.04.14
Comments