Mysql常用技巧

1、mysql通过replace函数实现字符替换 update `user` SET `name` = replace (`name`,'张','赵') where `name` LIKE '%张%'

1、mysql通过replace函数实现字符替换

update `user` SET `name` = replace (`name`,'张','赵') where `name` LIKE '%张%'
2、find_in_set函数使用
SELECT * FROM `user` where FIND_IN_SET(age,"18,20,22");
3、查看mysql版本
select version();
4、查看所有表创建日期
select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'activiti' order by create_time desc;
SELECT table_schema,table_name,create_time FROM information_schema.tables WHERE table_schema='activiti'
 





  • 发表于 2018-01-31 15:54
  • 阅读 ( 1880 )
  • 分类:mysql

0 条评论

请先 登录 后评论
不写代码的码农
Jonny

程序猿

65 篇文章

作家榜 »

  1. 威猛的小站长 124 文章
  2. Jonny 65 文章
  3. 江南烟雨 36 文章
  4. - Nightmare 33 文章
  5. doublechina 31 文章
  6. HJ社区-肖峰 29 文章
  7. 伪摄影 22 文章
  8. Alan 14 文章