小编Mar*_*len的帖子

在 SQL Server 中使用 select 来使用标准创建表时,收到“In Correct syntax around '('”错误消息

当我通过 Microsoft SQL Server Management Studio 使用 SQL Server 运行以下查询时,为什么会在本文的标题中出现错误?

-- create the dash_airports table
CREATE TABLE dash_airports 
    AS ( SELECT [Loc_Id], [ARP_Latitude], [ARP_Longitude], [Facility_Type], [Wind_Indicator] 
    FROM airportandrunway.dbo.Airports
    WHERE  [Loc_Id] IN ('09J','14A','18A','1V6','22S','2I0','YKM','YKN') );

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '('.
Run Code Online (Sandbox Code Playgroud)

我按照本指南文章中解决方案 2 的说明进行操作,但它显然不起作用。因此,作为健全性检查,我在 MySQL Workbench 中运行了它,它确实在那里工作了!是什么赋予了?

证明它在 Workbench 中有效: 在此输入图像描述

sql-server t-sql errors

8
推荐指数
2
解决办法
4690
查看次数

标签 统计

errors ×1

sql-server ×1

t-sql ×1