1 SET_DEFAULT_DATE_FORMAT Specifies whether columns with the DATE data type or with the built-in function CURRENT_TIMESTAMP are interpreted as VMS or SQL99 format. 2 Environment You can use the SET DEFAULT DATE FORMAT statement: o In interactive SQL o Embedded in host language programs to be precompiled o As part of a procedure in an SQL module o In dynamic SQL as a statement to be dynamically executed 2 Format SET DEFAULT DATE FORMAT --> runtime-options ----> runtime-options --+---> 'string-literal' ------+-----> +---> parameter -------------+ +---> parameter-marker ------+ 2 Arguments 3 parameter Specifies the value of runtime-options, which must be one of the following: o SQL99 o SQL92 o VMS 3 parameter-marker Specifies the value of runtime-options, which must be one of the following: o SQL99 o SQL92 o VMS 3 SQL99_or_SQL92 Specifies that the DATE data type and the CURRENT_TIMESTAMP built-in function are interpreted as SQL standard. The SQL standard format DATE contains only the YEAR TO DAY fields, and CURRENT_TIMESTAMP returns a TIMESTAMP data type. 3 'string-literal' Specifies the value of runtime-options, which must be one of the following: o SQL99 o SQL92 o VMS 3 VMS Specifies that the DATE data type and the CURRENT_TIMESTAMP built-in function are interpreted as VMS format. The VMS format DATE and CURRENT_TIMESTAMP contain YEAR TO SECOND fields. 2 Example Example 1: Changing the DATE format to SQL99 In the following example, SQL issues an error because, by default, the DATE data type is in OpenVMS DATE format. That is, it contains the fields YEAR through SECOND. The SET DEFAULT DATE FORMAT statement changes the default to ANSI/ISO format so that the CURRENT_DATE and DATE types are compatible. SQL> set default date format 'VMS'; SQL> -- SQL> create domain LOGGING_DATE cont> DATE cont> default CURRENT_DATE; %SQL-F-DEFVALINC, You specified a default value for LOGGING_DATE which is inconsistent with its data type SQL> -- SQL> set default date format 'SQL99'; SQL> -- SQL> create domain LOGGING_DATE cont> DATE cont> default CURRENT_DATE; SQL> show domain LOGGING_DATE; LOGGING_DATE DATE ANSI Oracle Rdb default: CURRENT_DATE