鱼儿眼中的海

阁下,你能找到这里,说明你天赋异禀,骨骼清奇,有经天纬地之才,包藏宇宙之志,真乃乱世之英雄,治世之能臣。...

MySql语句------------------更新

--查询多个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 


阅读更多
上一篇JSONArray转List<HashMap<String,String>>页面取值
下一篇KindEditor编辑
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭