您的位置:首页 > 博客中心 > 数据库 >

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

时间:2022-03-14 02:56

例子:

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...的函数可能会慢些 。

 

 

 

热门排行

今日推荐

热门手游