当前位置: 移动技术网 > IT编程>数据库>Oracle > Oracle最大日期获取方法

Oracle最大日期获取方法

2017年12月12日  | 移动技术网IT编程  | 我要评论

河北省工商局网上年检,cf紫川窗口化,北京电视台天下财经

在开发应用中如何获取oracle的最大日期呢?本文将提供这样一个获取方法,需要的朋友可以参考下
sql代码
复制代码 代码如下:

-- created on 2010/06/08 by nan
declare
-- local variables here
type t_test is table of date index by binary_integer;
v_test t_test;
v_date date;
begin
-- test statements here
v_test(1) := '20020202';
v_test(2) := '20090202';
v_test(3) := '20100202';
for i in 1 ..v_test.count loop
if v_date is null then
v_date := v_test( 1);
end if ;
if v_date < v_test(i) then
v_date := v_test(i);
end if ;
end loop;
dbms_output.put_line(v_date);
exception
when others then
dbms_output.put_line( sqlerrm);
end;

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网