SQL server使用CTE时报错:Incorrect syntax near the keyword ‘with‘.

在SQL server中使用CTE报错:Incorrect syntax near the keyword ‘with’. If this statement is a common table expression

 WITH RowOrder AS 
 (SELECT [Chart Number] FROM [dbo].[Patient] ) 

出现这种情况一般在With语句前还有其他的语句,在With前的语句末尾或者With前加上分号;即可

posted @   Smilecoc  阅读(5)  评论(0编辑  收藏  举报  
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· 单线程的Redis速度为什么快?
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
点击右上角即可分享
微信分享提示