Listing 6 creates a scalar function that extracts a given XML element from an input document and shows how this function can be invoked in a simple SQL query to return the name of a given customer.
清单6创建一个标量函数,它从输入文档中提取出一个特定的xml元素。然后,在一个简单的SQL查询中调用此函数,从而返回给定的客户的姓名。
A scalar subquery is an embedded query that returns a single row that contains a single column — essentially, a single value, which is known as a scalar.
标量子查询是一种嵌入式查询,返回包含单个列的单个行,本质上就是单个值,该值称为标量。
Listing 2 shows an array constructor with four elements with values given by the NULL constant, a variable, a literal and a scalar sub-query, respectively.
清单2显示具有4个元素的阵列构造函数,其值分别由NULL常数、变量、文字和标量子查询提供。
应用推荐