Select TRUNC(sysdate), TO_DATE(sysdate), CASE WHEN TRUNC(sysdate) = TO_DATE(sysdate) THEN 'Equal' ELSE 'Not Equal' END from dual;
Well, I got a 'Not Equal' and I don't understand why. Both result from TRUNC and TO_DATE are looked the same but they are not equal. Theoretically, they are same data type but they're still not equal.
So, what gives?