0

I am querying data from server to update fields in my local DB.

But, I have more than 100 columns hence I just want to know which column has new value(different than previous) so that I can use only those fields to prepare/make/build update command to my local DB.

EXAMPLE: I have 100 columns already in my DB. Same row in server has been update. Now that I have fetched all those 100 columns from server.(Stored in list object to make prepare statement in Java). Only 10 from 100 columns have updated. I want to which 10 columns have been updated.

How to do it with triggers?

Or there is any other way than triggers like, in Cassandra, inserting using same PK will act as an update for a row.

R_S_C
  • 75
  • 1
  • 10

1 Answers1

0

If you have to do the update you can add a RETURN statement for show updated rows. You cn see more on the documentation of Postgres: https://www.postgresql.org/docs/current/dml-returning.html

Frank Heikens
  • 117,544
  • 24
  • 142
  • 135