1, Space (N) output space
SELECT SPACE (5);
""
2, replace (STR,FROM_STR,TO_STR) said Str in from_str replaced by to_str
SELECT REPLACE (' http://www.baidu.com.cn ', ' Baidu ', ' Google ');
http://www.google.com.cn
3, repeat (str,n) repeat output N times str
SELECT REPEAT (' What ', 2);
Whatwhat
4, reverse () reverse output the contents in parentheses
SELECT REVERSE (123);
321
5. Insert (STR1,POS,LEN,STR2) str1 the position of the POS where the string is inserted, str2 replace the contents of the Pos+len string length
SELECT INSERT (' 123456 ', 3,2, ' haha ');
12haha56
6. ELT (POS,STR1,STR2,STR3.) Print POS Location str
SELECT ELT (4, ' What ', ' ahahaha ', ' haha ', ' ah ');
Ah
7. Field (STR,STR1,STR2,STR3,STR4 ...) output str pos, no case, output null
SELECT FIELD (' ah ', ' What ', ' ahahaha ', ' haha ', ' ah ');
4
8, lower () uppercase to lowercase upper (), UCase () lowercase to uppercase
SELECT LOWER (' ABC ');
abc
SELECT UPPER (' ABC ');
ABC
SELECT UCASE (' ABC ');
ABC
9, Load_file (file_name)
UPDATE table_name
SET blob_column=load_file ("/tmp/picture")
WHERE id=1;
10, Concat (), Group_concat ()
SELECT CONCAT (' Hello ', ' world ');
HelloWorld
MySQL function (ii)