![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MySQL
shenhua
2013-05-01下定决心步向成功
展开
-
mysql中limit与in不能同时使用的解决方式.
MySQL5.1中子查询是不能使用LIMIT的,报错: "This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' "这样的语句是不能正确执行的。select * from message where id in (select id from message order by原创 2011-10-31 13:53:49 · 4604 阅读 · 0 评论 -
Mysql复制本表内容插入数据
1、insert into cms_profile(typeid,ctgid,title,imgsrc)select 3 as siteid, 21 as typeid,ctgid,title,imgsrc,imgpck,filepck,outline,content,item1,item2,item3,item4,item5,extcnt from cms_profile where sit原创 2014-09-03 14:13:38 · 1909 阅读 · 0 评论 -
,mysql集锦
select *,count(distinct msid),count(distinct mdate) from matterinfo group by mdate,msid order by UNIX_TIMESTAMP(mdate) desc为了提高效率,把两个字段加上联合索引:create index mt on matterinfo(msid,mdate)原创 2012-03-06 13:36:28 · 962 阅读 · 0 评论