字符串第一个位置下标为1
mysql> select CONV(‘a‘, 16, 2); 1010 mysql> select CONV(‘6E‘, 18, 8); 172 mysql> select CONV(-17, 10, -18); ‘-H‘
mysql> select CHAR(77, 121, 83, 81, ‘76‘); ‘MySQL‘
mysql> select LPAD(‘1234‘, 5, ‘ab‘); ‘a1234‘
mysql> select SUBSTRING_INDEX(‘www.mysql.com‘, ‘.‘, 2); ‘www.mysql‘
select TRIM(TRAILING ‘abc‘ FROM ‘1234abc‘); ‘1234‘
mysql> select FIND_IN_SET(‘b‘, ‘a,b,c,d‘); 2
mysql> select MAKE_SET(1 | 2,‘hello‘,‘nice‘,‘world‘); ‘hello,nice‘ mysql> MAKE_SET(4 | 2 ,‘hello‘,‘nice‘,‘world‘); ‘nice,world‘ mysql> SELECT MAKE_SET(0,‘a‘,‘b‘,‘c‘); ‘‘
mysql> select EXPORT_SET(8 | 2 | 1, ‘a‘, ‘b‘, ‘,‘, ‘6‘); a,a,b,a,b,b
mysql> select 1 + ‘1‘; 2 mysql> select CONCAT(2, ‘ test‘); ‘2 test‘
原文地址:http://www.cnblogs.com/jolin123/p/4069275.html