The SQL/XML specification includes functions to construct XML data. These functions allow the user to construct new XML elements or attributes with values e.g. from relational tables. Other functions such as XMLCONCAT or XMLAGG can be used to combine small XML fragments into larger ones. The list of available construction functions includes:
SQL/XML also defines functions which allow the user to embed XQuery expressions in SQL statements. These functions include:
While XMLQUERY returns values of type XML, the function XMLTABLE can take XML data as input and produce a relational table as output. Predicates on XML data, such as search conditions, can be expressed with the XMLEXISTS predicate, typically in the WHERE clause of a SQL statement.
Further information and examples of the SQL/XML functions are provided in the external links below.