Name

sql_statistics — retrieve statistics information on remote DSN

Synopsis

vector sql_statistics ( in dsn varchar ,
in qualifier varchar ,
in owner varchar ,
in table_name varchar ,
in is_unique integer ,
in detail integer );

Description

This SQL function corresponds to the ODBC catalog call of similar name. It is used to access the data dictionary of remote data sources inside the ATTACH TABLE process.

The dsn argument must refer to a dsn previously defined by vd_remote_data_source or ATTACH TABLE.

The qualifier argument corresponds to the szTableQualifier and cbTableQualifier arguments of an ODBC catalog function. A SQL NULL value corresponds to the C NULL value. The arguments can contain % signs, which are interpreted as in LIKE.

These functions return an array, with one element for each row of the result set. Each row is represented as an array with one element for each column.

Parameters

As defined in ODBC API for the corresponding catalog call.

Return Types

As defined in ODBC API for the corresponding catalog call.

An array with one element for each row of the result set. Each row is represented as an array with one element for each column.

Examples

Example24.396.Simple Example

dbg_obj_print (sql_statistics ('Local Virtuoso', 'Demo', NULL, 'Orders', 0, 1));
->
(
 ("Demo" "demo" "Orders" 0 "Demo" "Orders" 3 1 "OrderID" <DB NULL> <DB NULL> <DB NULL> <DB NULL> )
)