标签: mysql
我有一个名为place的列的表,其中包含1,2,3(逗号分隔值)等数据。我需要获取表格place = 1
place
1
2
3
place = 1
select * from schools where place = 1
答案 0 :(得分:2)
试试这个:
SELECT * FROM schools WHERE FIND_IN_SET('1',place);
有关FIND_IN_SET的详细信息,请参阅:FIND_IN_SET
答案 1 :(得分:0)
试试这个,
select * from schools where place LIKE '%1%'