I have the following schema with the following attributes:
USER(TABLE_NAME)
USER_ID|USERNAME|PASSWORD|TOPIC_NAME|FLAG1|FLAG2
I have 2 questions basically:
How can I make an attribute USER_ID as primary key and it should automatically increment the value each time I insert the value into the database.It shouldn't be under my control.
How can I retrieve a record from the database, based on the latest time from which it was updated.( for example if I updated a record at 2pm and same record at 3pm, if I retrieve now at 4pm I should get the record that was updated at 3pm i.e. the latest updated one.)
Please help.