# 22. Virtuoso Functions Guide - sql:column

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## sql:column

Returns the value of a column from SQL result-set.
any sql:column (constant column_name varchar);
Description

This is actually not a function but a special macro that is converted to a reference to a global parameter.

Parameters
column_name – A string constant (literal, not an expression) that is a column name in plain SQL syntax. It can be a column name (and it can be qualified to specify a table name or an alias name). It can be a name of a Virtuoso/PL variable. The string should not contain quotes around parts of the column name.
Return Types

The value of the sql:column() invocation is the value of some SQL column or variable. If the type of the value is not supported by XQuery interpreter then it will be converted according to generic rules for XQuery parameters.

Examples
Various invocations of sql:column

These two statements will produce identical results:

See Also

Pre-compilation of XPath and XQuery Expressions