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;
声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。