Skip to content

Latest commit

 

History

History
45 lines (39 loc) · 4.17 KB

File metadata and controls

45 lines (39 loc) · 4.17 KB
title XQuery Functions against the xml Data Type
description Learn about the XQuery functions that are supported for use against the xml data type.
author rothja
ms.author jroth
ms.date 03/09/2017
ms.service sql
ms.subservice xml
ms.topic reference
helpviewer_keywords
XQuery, functions
xml data type [SQL Server], XQuery
functions [SQL Server], XQuery
dev_langs
XML

XQuery Functions against the xml Data Type

[!INCLUDE SQL Server Azure SQL Database]

This topic and its subtopics describe the functions you can use when specifying XQuery against the xml data type. For the W3C specifications, see http://www.w3.org/TR/2004/WD-xpath-functions-20040723.

The XQuery functions belong to the http://www.w3.org/2004/07/xpath-functions namespace. The W3C specifications use the "fn:" namespace prefix to describe these functions. You do not have to specify the "fn:" namespace prefix explicitly when you are using the functions. Because of this and to improve readability, the namespace prefixes are generally not used in this documentation.

The following lists the XQuery functions that are supported against the xml data type.

Function Category Functions
Functions on Numeric Values ceiling
floor
round
XQuery Functions on String Values concat
contains
substring
lower-case Function (XQuery)
string-length
upper-case Function (XQuery)
Functions on Boolean Values not
Functions on Nodes number
local-name Function (XQuery)
namespace-uri Function (XQuery)
Context Functions last
position
Functions on Sequences empty
distinct-values
id Function (XQuery)
Aggregate Functions (XQuery) count
avg
min
max
sum
Constructor Functions (XQuery) Constructor Functions
Data Accessor Functions string
data
Boolean Constructor Functions (XQuery) true Function (XQuery)
false Function (XQuery)
Functions Related to QNames (XQuery) expanded-QName (XQuery)
local-name-from-QName (XQuery)
namespace-uri-from-QName (XQuery)
SQL Server XQuery Extension Functions sql:column() function (XQuery)
sql:variable() function (XQuery)

See Also

xml Data Type Methods
XQuery Language Reference (SQL Server)
XML Data (SQL Server)