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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| SELECT length("Facebook");
SELECT reverse("Facebook");
SELECT concat("abc","def");
SELECT concat_ws('.', 'www', array('facebook', 'com'));
SELECT substr("Facebook",-2); SELECT substr("Facebook",2,2);
SELECT upper("Facebook"); SELECT ucase("Facebook");
SELECT lower("Facebook"); SELECT lcase("Facebook");
SELECT trim(" facebook ");
SELECT ltrim(" facebook ");
SELECT rtrim(" facebook ");
SELECT regexp_replace('100-200', '(\\d+)', 'num');
SELECT regexp_extract('100-200', '(\\d+)-(\\d+)', 2);
SELECT parse_url('http://www.facebook.cn/path/p1.php?query=1', 'HOST');
SELECT get_json_object( '[{"website":"www.itcast.cn","name":"allenwoon"}, {"website":"cloud.itcast.com","name":"carbondata 中文文档"}]', '$.[1].website');
SELECT space(2);
SELECT repeat("123", 2);
SELECT ascii("apple");
SELECT lpad('hi', 5, '??');
SELECT lpad('hi', 1, '??');
SELECT rpad('hi', 5, '??');
SELECT split('oneAtwoBthreeC', '[ABC]');
SELECT find_in_set('ab', 'abc,b,ab,c,def');
|