I want to get just Inserted/Modified record based on updated_timestamp.
I have following scenario for
insert into table_name(x,y,CURRENT TIMESTAMP);
select * from table_name where updated_timestamp > ?
If I understand what your asking, couldn't you use a subquery pulling the max(updated_timestamp) and other values from the table and use that to filter to only the most recently updated records for each one?
Something like this:
insert into table_name (x, y, timestamp) Select table_name.x, table_name.y, DateTime() from table_name join (select x, y, Max(updated_timestamp) updated_timestamp from table_name) table_name2 on table_name.x = table_name2.x and table_name.y = tablename2.y and table_name.updated_timestamp = table_name2.updated_timestamp