Home > Backend Development > PHP Tutorial > SQL IN 有关问题

SQL IN 有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:22:38
Original
803 people have browsed it

SQL IN 问题

本帖最后由 goimt 于 2015-07-08 17:42:07 编辑 id值50
where id in (50) 就正常

但是当 id值50,51,52
where id in (50) 就搜索不出来
where id in ('50')? 也不行
如何解决
------解决思路----------------------
like 或者 find_in_set 都可以。

select * from tb where id like '%50%'

或者

select * from tb where find_in_set('50',id)
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template