我想创建一个临时表并在 redshift 中调用这个临时表?我试过这个,但收到一条错误消息。
select top 10 * into #a from public.item_activity where item_act_timestamp < DATEADD(day,-1,getdate());
select * from #a
"ERROR: 42P01: relation "#a" does not exist"
最佳答案
您可以使用
Create temporary table tbl_name as (Select * from abc)
--OR
create temporary table tmp_date_var AS
( SELECT '2017-04-01'::Date AS stdt,'2018-01-31'::Date AS enddt);
关于temp-tables - 如何在 redshift 中创建和调用临时表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29739571/