解决方案 »
- sql-front中运行sql语句的时候怎么一次只能建立一个表?
- My sql insert 后返回自增ID 用参数方式的问题
- SqlServer语句改成Mysql语句
- 有人可以在mysql中输入“烜、昉、燊、玥”四个字吗?
- 请问:要设置phpMyAdmin里的配置文件,文件名是什么?
- 用select语句时怎样使mysql不区分记录值的大小写
- delphi中的mysql的连接问题
- 如果一个字段有多个数据
- mysql免安装启动时提示1607的错误
- [跪求解决]百度服务器BCC下用yum安装的mysql5.7.20无操作运行数小时自动shutdown
- mysql:如何把第一列和第二列一样的多行数据合并成一行?
- ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'test'
select crmID from modifyHistory h1
where newValue like '%已面谈%' and (modifyTime > '2012-05-01 00:00:00' and modifyTime < '2012-05-29 23:59:59')and ((select count(1) from modifyHistory h2 where newValue like '%已面谈%' and h2.crmID = h1.crmID and h2.modifyTime < h1.modifyTime) = 0)
newvalue和modifyhistory都没有建立索引..
create index x2 on modifyHistory(crmID,modifyTime);
from modifyHistory h1
where newValue like '%已面谈%'
and modifyTime between '2012-05-01' and '2012-05-29 23:59:59'
and not exists (
select 1 from modifyHistory
where newValue like '%已面谈%'
and crmID = h1.crmID
and modifyTime < h1.modifyTime
);
from modifyHistory h1
where newValue like '%已面谈%'
and modifyTime between '2012-05-01' and '2012-05-29 23:59:59'
and not exists (
select 1 from modifyHistory
where newValue like '%已面谈%'
and crmID = h1.crmID
and modifyTime < h1.modifyTime
);