# 22. Virtuoso Functions Guide - sql_tables

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
att_local_name
quote_dotted
rclose
rexecute
rmoreresults
rnext
rstmtexec
sql_columns
sql_config_data_sour...
sql_data_sources
sql_driver_connect
sql_get_installed_dr...
sql_get_private_prof...
sql_gettypeinfo
sql_primary_keys
sql_procedures
sql_remove_dsn_from_...
sql_special_columns
sql_statistics
sql_tables
sql_transact
sql_write_file_dsn
sql_write_private_pr...
vd_remote_data_sourc...
vd_remote_proc_wrapp...
vd_remote_table
vd_statistics
vdd_disconnect_data_...
vdd_measure_rpc_time
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_tables

get list of tables from remote DSN
vector sql_tables (in dsn varchar, in qualifier varchar, in owner varchar, in table_name varchar, in tabletype varchar);
Description

This function corresponds to the ODBC catalog call of similar name. It and related functions are used by the virtual database to query remote data dictionaries.

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.

Parameters

As defined in ODBC API for the corresponding catalog call.

Return Types

As defined in ODBC API for the corresponding catalog call.

This function returns 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
Simple example

    dbg_obj_print (sql_tables ('Local Virtuoso', 'Demo', NULL, NULL, NULL));
    ->
    (
     ("Demo" "demo" "Categories" "TABLE" <DB NULL> )
     ("Demo" "demo" "Customers" "TABLE" <DB NULL> )
     ("Demo" "demo" "Employees" "TABLE" <DB NULL> )
     ("Demo" "demo" "Order_Details" "TABLE" <DB NULL> )
     ("Demo" "demo" "Orders" "TABLE" <DB NULL> )
     ("Demo" "demo" "Products" "TABLE" <DB NULL> )
     ("Demo" "demo" "Shippers" "TABLE" <DB NULL> )
     ("Demo" "demo" "Suppliers" "TABLE" <DB NULL> )
    )

See Also

sql_data_sources, sql_columns sql_primary_keys, sql_gettypeinfo, sql_statistics.