首页 > 解决方案 > 有没有办法通过 SQL 在 Snowflake 中创建一个临时表,而不必每次都编写列?与,插入

问题描述

insert into temp
select  code, 
case when code = 'S' then 1
when code = 'U' then 0
when code = 'R' then 4 
end 
from "table" r

临时表错误-如何在雪花中制作临时表而不必注意每一列

标签: sqlsnowflake-cloud-data-platform

解决方案


Create temp table temp as
select  code, 
case when code = 'S' then 1
when code = 'U' then 0
when code = 'R' then 4 
end 
from "table" r;

推荐阅读