我需要这样的东西:
SELECT * FROM `table` WHERE '123' IN (`column`)
在'column' (varchar 255字段)中有一些数字,如1,50,145,123,58,
我不知道如何更好地解释,但我想你明白我需要什么。
SELECT * FROM table WHERE FIND_IN_SET('123', column);
看到http://dev.mysql.com/doc/refman/5.0/en/string-functions.html function_find-in-set
try find_in_set
SELECT * FROM table WHERE find_in_set('123',column)
SELECT * FROM table WHERE column LIKE '%123%';
try this:
SELECT * FROM table WHERE column IN ('123');