Home  >  Article  >  Backend Development  >  mysql用了not in为何查不出数据

mysql用了not in为何查不出数据

WBOY
WBOYOriginal
2016-06-13 12:41:341296browse

mysql用了not in为什么查不出数据。
select id,cid,title,keywords,hits,addtime from `Articles` where id not in(4454,4453,4452,4451,4450,4449,4448,4447)  order by addtime desc ,id desc LIMIT 0 , 18


上面的语句去掉not in就有数据。这是为什么。 数据库里有4000多条数据,编号从 1到4454。不可能查不出的。而且之前没事,突然就查不出了。很奇怪。

Statement:
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
Previous article: 建站的有关问题 Next article: 求discuz好手解惑