我在表1中有以下数据
我知道
1 -> Sam
2 -> Joe
我想展示
当我有 id -> 地图作为静态地图时,不知道从哪里开始
如果您有某种不属于数据集的静态数据,您可以使用
WITH
with static_map(id, name) as( values (1, 'Sam'), (2, 'Joe') ) select t.id, t.marks, m.name from table1 t left join static_map m on t.id = m.id;