I have a table say demo with three columns
create table demo(demo_id number,
                  created_date date,
                  mod_date systimestamp(6)
                 ); 
my requirement is to return a refcursor with two columns
1. Demo_id 
2. Status column 
Which will be derived as follows:
if created_date = mod_date then "New" else "Updated" . 
So I have written my code as :
select demo_id ,case when created_date=mod_date then "New" else "update" end from demo; 
but somehow even though the dates are same including the timecomponent My status value is always showing updated. I am using SQL developer to run my queries and have also modified the nls_date_format to be DD/mm/yyyy hh24:mi:SS. Also mod_date will be storing systimestamp.
 
     
    