How to obtain the maximum Oracle date

Source: Internet
Author: User

How can I get the maximum Date of oracle in the development application? This article will provide such a method for obtaining information. For more information, see
SQL code
Copy codeThe Code is as follows:
-- 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): = '20140901 ';
V_test (2): = '20140901 ';
V_test (3): = '20140901 ';
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;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.