简体   繁体   English

“for json auto”和“for json path”在 SQL Server Management Studio 中给出语法错误

[英]"for json auto" and "for json path" give syntax error in SQL Server Management Studio

I have installed Microsoft SQL Server Management Studio 18, I want to view SQL output in JSON format, but the query is not working.我已经安装了 Microsoft SQL Server Management Studio 18,我想以 JSON 格式查看 SQL 输出,但查询不起作用。

select * from tablename for json auto

or或者

select * from tablename for json path

Gives this error:给出这个错误:

: Incorrect syntax near 'FOR'. (103010) (SQLExecDirectW)")

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

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