Note : SQL PHP To_Date format:

TO_DATE( string1, [ format_mask ], [ nls_language ] )

TO_DATE('2013/06/19', 'yyyy/mm/dd') =  June 19, 2013
TO_DATE('061913', 'MMDDYY') = June 19, 2013
TO_DATE('20130619', 'yyyymmdd') = June 19, 2013

 

SQL Query :

SELECT * FROM emp WHERE hiredate > TO_DATE('01-JAN-1982', 'DD-MON-YYYY') AND sal > 1000

EMP Table :

Oracle : 3 rows fits the above query

PostgreSQL: 6 rows fits the query

Out Put: Oracle 3 rows affected

PostgreSQL: 6 rows affected.


Note the differences: It was due to the data source in the table in Oracle, and not due to the different display formats.

PostgreSQL: