php - Problem with Sql conditional statement
阿神
阿神 2017-05-19 10:08:19
0
3
522

A sql statement has an employee id field after group by and is put together through the group concat function. Now the business requires finding the result that the employee id is a, then the employee field must be filtered whether it only has a or contains a. Come on, how do you write this?

阿神
阿神

闭关修行中......

reply all(3)
仅有的幸福

It is recommended that you briefly list the attributes of the table, otherwise the description will not be clear.
group concat is just grouping, what really plays a filtering role is the where condition

Ty80
select * from table where id like '%a%' 
迷茫

Use subquery, wrap it one layer and add where condition

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template