SQLite Forum

Is date/time atomic per statement/transaction?
Login
If you are reluctant or unable to apply this clever patch you could use the following in the CLI:

Create Table Data1 ( key, ts, saved_ts, info);
Create Table Data2 ( key, ts, saved_ts, info);
Begin;
.parameter set @SAVED_TS CURRENT_TIMESTAMP
Insert Into Data1 Values (1, CURRENT_TIMESTAMP, @SAVED_TS, 'This is a test');
Select * From Generate_Series(0,40000,1);
Insert Into Data2 Values (2, CURRENT_TIMESTAMP, @SAVED_TS, 'This is another test');
Commit;
.mode box
Select * from Data1;
Select * from Data2;

The Generate_Series() is just to slow down things between the two Inserts.
This is the result:

┌─────┬─────────────────────┬─────────────────────┬────────────────┐
│ key │         ts          │      saved_ts       │      info      │
├─────┼─────────────────────┼─────────────────────┼────────────────┤
│ 1   │ 2020-09-11 14:36:10 │ 2020-09-11 14:36:10 │ This is a test │
└─────┴─────────────────────┴─────────────────────┴────────────────┘
┌─────┬─────────────────────┬─────────────────────┬──────────────────────┐
│ key │         ts          │      saved_ts       │         info         │
├─────┼─────────────────────┼─────────────────────┼──────────────────────┤
│ 2   │ 2020-09-11 14:36:14 │ 2020-09-11 14:36:10 │ This is another test │
└─────┴─────────────────────┴─────────────────────┴──────────────────────┘

Anywhere else than the CLI you would obviously not have the .parameter statement, but you could use a Select for CURRENT_TIME or any other date/time combination, save the result and use that in subsequent Inserts.