b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

FOR JSON 如何转义特殊字符和控制字符 (SQL Se

电脑杂谈  发布时间:2019-06-20 02:08:37  来源:网络整理

sql 输出汉字转义_sql %转义_sql 特殊字符转义

parallel studio xe 为 c/c++ 和 fortran 开发人员提供了具有一流性能的编译器和库、正确的并行编程模型以及补充和兼容的分析工具。介绍:这是一本关于分布式并行处理的数据《explorations in parallel distributed processing: a handbook of models, programs, and exercises》,作者是斯坦福的 james l. mcclelland。最后当你的数据又大sql 特殊字符转义,又需要快的时候,你不懂系统是不行的,你必须懂系统,要考虑并行化,数据并行,模型并行,任务并行,并行要考虑一致性,如果数据直接有依赖、不能很好并行的话,考虑采用陈旧的数据,虽然损失精度,但可以加大并行度,靠更多的数据把精度补回来,这里的副作用是收敛变慢,因此要考虑是否合算。

本主题介绍了 SQL Server SELECT 语句的 FOR JSON 子句在 JSON 输出中如何转义特殊字符以及如何表示控制字符。This topic describes how the FOR JSON clause of a SQL Server SELECT statement escapes special characters and represents control characters in the JSON output.

重要

此页介绍了 Microsoft SQL Server 中对 JSON 的内置支持。This page describes the built-in support for JSON in Microsoft SQL Server. 有关 JSON 中的转义和编码的常规信息,请参阅 JSON RFC - https://www.ietf.org/rfc/rf627.txt 中的 2.5 部分。For general info about escaping and encoding in JSON, see Section 2.5 of the JSON RFC - https://www.ietf.org/rfc/rf627.txt.

如果源数据包含特殊字符,则 FOR JSON 子句在 JSON 输出中会使用 \ 对其进行转义,如下表中所示。If the source data contains special characters, the FOR JSON clause escapes them in the JSON output with \, as shown in the following table. 在属性名称及其值中sql 特殊字符转义,均会发生这种转义。This escaping occurs both in the names of properties and in their values.

特殊字符Special character转义后的输出Escaped output

sql 输出汉字转义_sql 特殊字符转义_sql %转义

引号 (")Quotation mark (")

反斜杠 (\)Backslash (\)

正斜杠 (/)Slash (/)

回车符Carriage return

水平制表符Horizontal tab

如果源数据包含控制字符,则 FOR JSON 子句在 JSON 输出中会使用 \u<code> 格式对其进行转义,如下表中所示。If the source data contains control characters, the FOR JSON clause encodes them in the JSON output in \u<code> format, as shown in the following table.

sql 输出汉字转义_sql %转义_sql 特殊字符转义

控制字符Control character编码后的输出Encoded output

下面是同时包含特殊字符和控制字符的源数据的 FOR JSON 输出的示例。Here's an example of the FOR JSON output for source data that includes both special characters and control characters.

查询:Query:

SELECT  
  'VALUE\    /  
  "' as [KEY\/"],  
  CHAR(0) as '0',  
  CHAR(1) as '1',  
  CHAR(31) as '31'  
FOR JSON PATH  

结果:Result:

{
    "KEY\\\t\/\"": "VALUE\\\t\/\r\n\"",
    "0": "\u0000",
    "1": "\u0001",
    "31": "\u001f"
}

sql 输出汉字转义_sql %转义_sql 特殊字符转义

有关 SQL Server 和 Azure SQL 中内置 JSON 支持的视频介绍,请观看以下视频:For a visual introduction to the built-in JSON support in SQL Server and Azure SQL Database, see the following videos:

使用 FOR JSON 将查询结果格式化为 JSON (SQL Server)Format Query Results as JSON with FOR JSON (SQL Server)

FOR 子句FOR Clause

发送有关以下对象的反馈:

此产品

也可以直接在 GitHub 上提供反馈。

sql 输出汉字转义_sql 特殊字符转义_sql %转义

此页面

也可以直接在 GitHub 上提供反馈。

正在加载反馈...

没有未决问题

没有已关闭的问题

在 GitHub 上查看


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-107183-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      每日福利
      热点图片
      拼命载入中...