New answers tagged timestamp
You should just use Date as datatype to store Date field. Additionally, Specify Timestamp over Datetime datatype if records are often updated every time the record is changed. If you want to store a specific value you should use a Datetime as datatype.
Assuming your table is called TS: SELECT EXTRACT (DAY FROM (end_ts-start_ts))*24*60*60+ EXTRACT (HOUR FROM (end_ts-start_ts))*60*60+ EXTRACT (MINUTE FROM (end_ts-start_ts))*60+ EXTRACT (SECOND FROM (end_ts-start_ts)) FROM TS; Common sense, to be honest. (May need an EXTRACT(YEAR too).
The IDENTITY generator is not well documented. There are some behaviors however that can be observed that seem relevant: The identity generation does not get affected by transactions. That means once a value has been used it will not be reused, even if the transaction causing its use is rolled back. Not every use causes an update of the sequence position ...
Top 50 recent answers are included