if table X is modified(DELETE, INSERT, UPDATE) then
    table X's metadata value should get incremented.

I can write trigger for the same. But inbuilt solution will be better.

This way I can stop issuing meaningless SELECT queries on the large table, which will give same result as previous.

Server side program can tell clients that nothing changed on server. No need to query.

In other words I want to get version number of table, which increments after every modification. I know UPDATE_TIME but for some engines, this value is NULL.

  • Which RDBMS is this for? Can't you use an auto increment ID column? – James Anderson Sep 18 '15 at 7:35
  • mysql. After table update auto_increment will not change. I want to poll version of table. – Nilesh Sep 18 '15 at 7:37
  • Look at the default on the first TIMESTAMP field in a table. – Rick James Sep 18 '15 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.