随笔分类 - mysql
摘要:1、常规方法 1 -- 当前时间 2 select now() as 当前时间; 3 -- 当前时间转换为时间戳 4 select unix_timestamp(now()) as 转换为时间戳; 5 -- 时间戳格式化 6 SELECT FROM_UNIXTIME(unix_timestamp(n
阅读全文
摘要:方法1、concat()函数 1 select code, name, 2 case 3 when length(code)=6 then concat(code,'000000') 4 when length(code)=9 then concat(code,'000') 5 else code
阅读全文
浙公网安备 33010602011771号