1-多显示一个字段,格式:【用户名:手机号】
select *,CONCAT(name,':',tel) from user;
2-手机号显示:132****22
select *,CONCAT(left(tel,3),'***',right(tel,2)) as '安全手机号' from user;
1-多显示一个字段,格式:【用户名:手机号】
select *,CONCAT(name,':',tel) from user;
2-手机号显示:132****22
select *,CONCAT(left(tel,3),'***',right(tel,2)) as '安全手机号' from user;
-- select *,concat(name,':',tel) as '昵称' from user;
select *,left(tel,3),right(tel,2), CONCAT(left(tel,3),'***',right(tel,2)) from user;
date
int 时间戳
如何查询3月份数据(注:18 19 17)
DATE_FORMAT(NOW(),’%d %b %y’)
select * from 表名 where created_at = 3月
select * from 表名 where DATE_FORMAT(created_at,'%m') = 3
select * from 表名 where DATE_FORMAT(created_at,'%Y') = 2018
创建于
更新于
是否删除:1-是,0-否
ctrl + w 关闭窗口 close window
ctrl + h 查看历史记录 history
ctrl + j 历史下载
ctrl + u 查看源代码
F12 开发工具
ctrl+d 收藏当前网址到书签