比如我想查询2008年7月25日那天的记录,我应该怎么调用 to_days() ?select * from 表名 where 后面的调用 to_days() 试了几种日期的方式都报错,请指点,谢谢.
解决方案 »
- 插入中文报错:incorrect string value
- mysql备份数据库
- mySQL 跨平台 windows client连接 linux 下mysql?
- 为什么Navicat for MySQL 连接不上?谁帮帮我?
- mysql建表: 出现 error 1604(42000)的错误,建表的源代码如正文(是在数据库“test”中建立这个表的)
- MYSQL连接查询
- 听说MYSQL 不支持数据对象那我怎么在PB中插入数据啊(我连接ODBC了)
- 有谁知道postgresql能不能在WINDOWS下运行?
- 【内存占用】MySQL占用的内存非常高,开始使用SWAP空间
- python连接Mysql数据库
- MySql中插入特殊中文字符出错
- 用文本方式将数据装入数据库表中
ERROR 1054 (42S22): Unknown column 'rq' in 'where clause'
mysql> select * from user_accounting_history where rq>='2008-7-25';
ERROR 1054 (42S22): Unknown column 'rq' in 'where clause'
mysql>
+---------------------+
| (now()) |
+---------------------+
| 2008-11-06 09:21:14 |
+---------------------+
1 row in set (0.00 sec)mysql> select to_days(current_date);
+-----------------------+
| to_days(current_date) |
+-----------------------+
| 733717 |
+-----------------------+
1 row in set (0.00 sec)mysql>
Empty set (0.46 sec)而这一天是有数据的.
select * from 表 where to_days('字段名')=to_days('2008-07-25')