select * from FMS_Recharge where OperDate >2000-1-1 and OperDate<2000-11-1
2010-12-26 10:48
399 查看
数据库查询区间问题
今天查询数据,
![](http://student.csdn.net/attachment/201012/26/1035895_1293331529Iu4F.jpg)
一个条件时候可以查到数据;
![](http://student.csdn.net/attachment/201012/26/1035895_1293331528jL9j.jpg)
却不能查到数据了。
解决办法:给参数添加单引号就ok了,囧…
![](http://student.csdn.net/attachment/201012/26/1035895_1293331529W87N.jpg)
总结:以后写参数记得添加引号,万无一失。
今天查询数据,
![](http://student.csdn.net/attachment/201012/26/1035895_1293331529Iu4F.jpg)
一个条件时候可以查到数据;
![](http://student.csdn.net/attachment/201012/26/1035895_1293331528jL9j.jpg)
却不能查到数据了。
解决办法:给参数添加单引号就ok了,囧…
![](http://student.csdn.net/attachment/201012/26/1035895_1293331529W87N.jpg)
总结:以后写参数记得添加引号,万无一失。
相关文章推荐
- """select * from TRACEUSER where STARTIME >=#2008-8-8 8:00:00# and STARTIME <= #2008-9-3 15:25:42#"""""
- select * from (select t.*,rownum as rowno from (select * from j_kqzw where 1=1 and DEADLINE >='2013-04-14' and DEADLINE <='2014-04-14' ) t)where rown
- 有多少行? SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid < 2
- select * from (select P.*,ROWNUM RN FROM(select * from Mp_Relatedart where pubbaseid=785 order by ID ASC )P)M WHERE M.RN>2 and M.RN <= 7
- UPDATE {0} SET DisplayOrder=(SELECT COUNT(1) FROM {0} b WHERE b.DisplayOrder<a.DisplayOrder AND {1})
- 040908 R Oracle & SqlServer 's ORDER -->select top & where rownum <= 3
- ibatIS的<dynamic prepend="WHERE">原理,是判断前一个AND字母是否存在
- jquery date 添加年月日<select><option>
- MySQL查询优化:LIMIT 1避免全表扫描【如判断用户是否存在select * from users where username='123' and passwd='123' limit 1】
- <<Beginning XML with DOM and Ajax From Novice to Professiona>>Contents
- select rownum num from( select * from test order by num) where rownum<=5
- <LeetCode OJ> 106. Construct Binary Tree from Inorder and Postorder Traversal
- sql 语句中 id< ;SELECT * FROM t_blog WHERE id<#{id} ORDER BY id DESC LIMIT 1
- <LeetCode OJ> 105. Construct Binary Tree from Preorder and Inorder Traversal
- pass all options of <select> from View to controller
- 为梦想而生 living for dream <Big Data and Web Intelligence>
- <s:select ></s:select>使用
- Date <-> String
- 从零开始学android<日期选择器:DatePicker的使用.十二.>
- <fmt:formatDate>&<fmt:parseDate>的使用方法demo