With this form of recording:
... where start_date > '01-NOV-01'
there will be an implicit date conversion in accordance with the format specified in NLS_DATE_FORMAT for the current session, which you can find out like this:
SQL> select * from nls_session_parameters where parameter='NLS_DATE_FORMAT'; PARAMETER VALUE ----------------- ------------- NLS_DATE_FORMAT DD-MON-RR
That is, in fact, will be executed:
... where start_date > to_date ('01-NOV-01', 'DD-MON-RR')
It is almost impossible to achieve the installation of the same default value of the NLS_DATE_FORMAT parameter for all sessions where a request is made with a similar recording form.
Therefore, the entry form without explicitly specifying the date conversion format, or as mentioned in the question:
not explicitly leading to date type
not recommended and should be avoided .
You must either explicitly specify the date format, as in your case:
to_date ('01-ЯНВ-01', 'DD-MON-RR')
Or set the date literal (date literal) in ANSI format 'YYYY-MM-DD' :
... where start_date > date'2001-11-01'
This format is independent of the NLS session or database settings and cannot be changed. This form of recording is preferred if you do not need to specify the time, because it is not in this format.
More in off. documentation .
select * from subs_histories where start_date > '2001-11-01will be executed always and everywhere - Anton Shchyrovdateforgot before date :) See my answer. - Dmitriy