考虑PostgreSQL上的这张表,但有数千条记录:
\n\n| id | uuid | color | ... | deleted_at |\n|----|---------|----------|-----|---------------------|\n| 1 | 4fc1... | red | ... | 2020-01-01 13:00:00 |\n| 2 | 4fc1... | gray | ... | 2020-01-01 13:00:00 |\n| 3 | 4fc1... | blue | ... | null |\n| 4 | 4fc1... | red | ... | null |\n| 5 | 4fc1... | blue | ... | 2019-12-03 00:45:00 |\n
Run Code Online (Sandbox Code Playgroud)\n\n目的:
\n\nid
(自动增量)用作主键和主要挂钩,以与其他表一起使用 JOIN。uuid
是用于识别记录的面向公众的值。deleted_at
(timestamp|null) …