SELECT * FROM yw_b2b_gyinfo WHERE info_state <> 0 ORDER BY user_state DESC,info_posttime DESC;
给出这个查询的复合语句能用的.
create index idx1 on `yw_b2b_gyinfo` (info_state,info_title,user_state,info_posttime)
这个不行.就不用发这个了.
给出这个查询的复合语句能用的.
create index idx1 on `yw_b2b_gyinfo` (info_state,info_title,user_state,info_posttime)
这个不行.就不用发这个了.
解决方案 »
- 写一个sql文,取包含有某个字符串的所有字段,详见下文
- mysql的错误,请大家帮忙看看是什么原因
- at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913)错误
- mssql连接mysql,驱动odbc5.1,不能insert
- mysql配置问题
- 怎么把MYSQL卸载干净啊。。
- 用MYSQL Connector连接数据库时候出现字符集错误
- 请问:如何在delphi中编写能动态地更改mysql和sybase两种数据库的用户名和密码的程序??
- 这个sql语句如何实现?
- 如何在一个表里,按分类,每个分类select10条数据?
- mysql中where子句该如何写
- 求一删除触发器的语句
足矣。前面加上 info_state 反而无效。
因为你的查询是 info_state <> 0 第一个如果是 info_state 的话,该索引无效。