首页 > 数据库技术 > 详细

在Oracle PL-SQL中,between and 函数的用法

时间:2014-11-24 19:15:51      阅读:831      评论:0      收藏:0      [点我收藏+]

例子:

select * from table_test 
	where creatdate between to_date('2009-11-1 8:47:14','yyyy-mm-dd hh24:mi:ss') 
	and to_date('2009-12-1 8:47:14','yyyy-mm-dd hh24:mi:ss') 


推荐使用:

select * from table_test 
	where creatdate >= to_date('2009-11-01 8:47:14','yyyy-MM-DD') 
	and creatdate <= to_date('2002-03-01' ,'YYYY-MM-DD');


用between...and...的函数可能会慢些 。

 

 

 

在Oracle PL-SQL中,between and 函数的用法

原文:http://blog.csdn.net/helloboat/article/details/41448343

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!