繁体   English   中英

在雪花中执行多个创建视图语句

[英]execute multiple create view statements in snowflake

有没有办法在 Snowflake 的一个查询中创建多个视图?

当我尝试这个时,我不断收到错误 -

create or replace view forecast_view as
select * from forecast
where variable = 'Name'
    
go

create or replace view demand_view as
select * from demand
where variable = 'Name'

错误:

SQL compilation error: syntax error line 5 at position 0 unexpected 'go'.

我也试过这个 -

create or replace view forecast_view as
select * from forecast
where variable = 'Name';

create or replace view demand_view as
select * from demand
where variable = 'Name';

但它只执行第一个创建视图语句。

SnowFlake 中没有“go”命令:

雪花命令

在存储过程中执行多个 SQL 语句

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM