Binding Relational Data Inside XML Data
sql:column() and sql:variable() inside XQuery
What changes
- Input
- none
- Output or change
- none
Syntax at a glance
n/a (reference page)
Work example
Bind a relational value into an XQuery when a row supplies the XML search key.
Keep SQL values typed and use the documented SQL column or SQL variable binding form.
Check your work Relational values and XQuery literals have different type and quoting rules.
Open Microsoft Learn for full syntax, permissions, and details for your version.