By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE EXTENSION
CREATE TABLE
ALTER TABLE
| id | user_id | created_at | updated_at | data |
|---|---|---|---|---|
| 1 | 1 | 2023-11-22 01:18:48.292674 | 2023-11-22 01:20:28.292674 | foo |
| 2 | 2 | 2023-11-22 01:21:28.292674 | 2023-11-22 01:21:28.292674 | bar |
INSERT 0 2
UPDATE 1
| id | user_id | created_at | updated_at | data |
|---|---|---|---|---|
| 1 | 1 | 2023-11-22 01:18:48.292674 | 2023-11-22 01:20:28.292674 | foo |
| 3 | 1 | 2023-11-22 01:22:08.304324 | 2023-11-22 01:22:08.304324 | foo_new |
| 5 | 3 | 2023-11-22 01:22:08.304324 | 2023-11-22 01:22:08.304324 | baz_new |
| 2 | 2 | 2023-11-22 01:21:28.292674 | 2023-11-22 01:22:08.304324 | bar_new |
SELECT 4