By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
id | ts | ts2 |
---|---|---|
1 | 2022-01-01 00:00:00 | null |
2 | 2022-01-24 21:33:10 | null |
Table | Create Table |
---|---|
test | CREATE TABLE `test` ( `id` int DEFAULT NULL, `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `ts2` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
check_data |
---|
1 |
Duplicated values not allowed. 0
check_data |
---|
0 |
@t1 <=> @t2 | ISNULL(@t1) | ISNULL(@t2) |
---|---|---|
1 | 1 | 1 |
Duplicated values not allowed. 0
SLEEP(2) |
---|
0 |
Duplicated values not allowed. 0
id | ts | ts2 |
---|---|---|
1 | 2022-01-01 00:00:00 | null |
2 | 2022-01-24 21:33:10 | null |
3 | 2022-01-24 21:33:10 | 2033-03-03 00:00:00 |
3 | 2022-01-24 21:33:12 | 2004-04-04 00:00:00 |