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
| abs(x) format(x, d) ceil(x) floor(x) round(x) mod(m, n) pi() pow(m, n) sqrt(x) rand() truncate(x, d)
now(), current_timestamp(); current_date(); current_time(); date('yyyy-mm-dd hh:ii:ss'); time('yyyy-mm-dd hh:ii:ss'); date_format('yyyy-mm-dd hh:ii:ss', '%d %y %a %d %m %b %j'); unix_timestamp(); from_unixtime();
length(string) char_length(string) substring(str, position [,length]) replace(str ,search_str ,replace_str) instr(string ,substring) concat(string [,...]) charset(str) lcase(string) left(string, length) load_file(file_name) locate(substring, string [,start_position]) lpad(string, length, pad) ltrim(string) repeat(string, count) rpad(string, length, pad) rtrim(string) strcmp(string1 ,string2)
case when [condition] then result [when [condition] then result ...] [else result] end 多分支 if(expr1,expr2,expr3) 双分支。
count() sum(); max(); min(); avg(); group_concat()
md5(); default();
|