create or replace procedure pro_time(starttime in varchar2,endtime in varchar2) is
begin
declare
v_starttime date;
v_endtime date;
begin
v_starttime := to_date(starttime, 'yyyy-mm-dd hh24:mi:ss');
v_endtime := to_date(endtime, 'yyyy-mm-dd hh24:mi:ss');
dbms_output.put_line(
select *
from table
where åå¸çæ¶é´ between v_starttime and v_endtime);
end;
end pro_time;
è°ç¨è¿ç¨
sql>set serveroutput on
sql>execute pro_time(2011-12-4 17:42:47,2011-12-4 18:00:00)
第ä¸ä¸ªæ¶é´æ¯æ¶é´æ®µèµ·æï¼ç¬¬äºä¸ªæ¶é´æ¯æ¶é´æ®µæ¢æ
温馨提示:内容为网友见解,仅供参考