为什么我在这个特定视图中得到 "Create View must be the only statement in the batch"?

Why am I getting "Create View must be the only statement in the batch" in this specific View?

我正在使用 SQL 服务器,我有以下 T-SQL 查询,它应该在我的数据库中创建一个视图。

USE [MyDatabase]

CREATE VIEW [Test1] 
AS
    WITH cte1 AS
    (
        SELECT * FROM [Table1]
    ),
    cte2 AS  
    (
         SELECT cte1.* 
         FROM [cte1]
         WHERE cte1.[Month] BETWEEN '2019-01-01' AND '2019-12-31'
    )
    SELECT * FROM [cte2]

我从这个查询中收到一条不正确的语法错误消息:

Create View must be the only statement in the batch

我一直在这里寻找解决方案:How to create a view with a CTE?

但是,我无法弄清楚我的 T-SQL 查询有什么问题!

USE [MyDatabase]CREATE

之间单独放置一个 GO