--查询多个id--
select * from t_wiki where id in (1486,1487,1488,1489,1490,1491,1492)
--查询标题为空(不为空)的数据--
select * from jz_know where title is null (is not null)
--id在多少和多少之间--
select * from jz_know where id between 100 and 200
--查询字符串--
SELECT * FROM jz_know WHERE title = '钢笔'
SELECT * FROM jz_know WHERE title like '钢笔%' 钢笔fdsfsa
SELECT * FROM jz_know WHERE title like '%钢笔' fdasfsd钢笔
SELECT * FROM jz_know WHERE title like '%钢笔%'
--查询日期型数据--
select * from jz_know where e_save='2016-06-28 11:39:34'
--取前100条数据,limit都是在最后,可以和order by等组合查询--
select * from jz_know limit 0,20
select * from jz_know limit 20
--查询是否有标题重复的文章--
select title,count(title) as count from jz_know where e_aid=51 group by title having count>1
select title,count(title) as count from jz_know group by title having count>1