2015年8月13日

find_in_set

摘要: SELECT * FROM tablename where field1=2 and find_in_set(70,field2) ORDER BY `id` DESCfield2 里某条记录为 70,71,72,73会被找到,保存的值结构为逗号分隔 阅读全文

posted @ 2015-08-13 11:50 walter371 阅读(151) 评论(0) 推荐(0) 编辑

mysql substring_index

摘要: select * from tablename where substring_index(field1,'_',-1)=‘abc'#表中field1的值结构为123_abc 阅读全文

posted @ 2015-08-13 11:43 walter371 阅读(166) 评论(0) 推荐(0) 编辑

mysql字段累加concat

摘要: update tablename set field1=concat(field1,'_bak') where field2 like '%@xxx’ 阅读全文

posted @ 2015-08-13 11:41 walter371 阅读(591) 评论(0) 推荐(0) 编辑

导航