blsn.net
当前位置:首页 >> Mysql数据库一个表字段中存了iD,并以逗号分隔,iD对... >>

Mysql数据库一个表字段中存了iD,并以逗号分隔,iD对...

SELECT a.aid AS '序号', a.`主管领导`, GROUP_CONCAT(b.`姓名`) AS `主管领导姓名` FROM a LEFT JOIN b on FIND_IN_SET(b.id , a.`主管领导`) GROUP BY a.aid ORDER BY a.aid ASC

试试下面这句行不 select name from B where id find_in_set(id,select sevice from A where id=1)

SELECT * FROM `task_detatils` WHERE FIND_IN_SET( '1', responsible_user) 将含有1的responsible_user列数据全部搜索出来

select ID,group_concat(NAME) as NAME from table group by ID; select ID,group_concat(NAME SEPARATOR ';') as NAME from a group by ID;

str = '重庆,四川,北京'; SELECT substring_index('重庆,四川,北京','.', 1); #重庆 SELECT substring_index('重庆,四川,北京','.', 2); #四川 SELECT substring_index('重庆,四川,北京','.', 3); #北京 mysql系统特性: 1、使用C和C++编写,并...

第一部分: FIND_IN_SET()函数用法, 查询用逗号分隔的字段, 表A中 go_value字段的值是以逗号分割, 查询 go_value字段中含有3的行: select * from A where find_in_set('3', go_value);

select * from test where id ='8' or id like '8,%' or id like '%,8,%' or id like '%,8' 或者 select * from test where [con_cat](',',id,',') like '%,8,%' 注意把[con_cat]的[]去掉,还有_也去掉就可以了,可能百度把这个字母做了屏蔽

select oligo_id, tag_ids from wjl_oligo where tag_ids REGEXP '(^|,)5($|,)'; 2 3,5 3 5,6 5 3,5,7 7 5,15 10 5 13 3,5,6 14 3,5,7,8

select replace(concat('''',channel,''''),',',''',''') from tb_user where id='1';这样么

select a.*,b.* from a left join b on find_in_set(b.id,a.zd1)

网站首页 | 网站地图
All rights reserved Powered by www.blsn.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com