Mysql Toolkit - connection.sqlfind


data = sqlfind (conn, pattern)
data = sqlfind (conn, pattern, propertyname, propertyvalue …)

Find information about table types in a database.

Inputs

conn

currently open database connection.

pattern

Name or pattern to match table in database. Use ” to match all tables.

propertyname, propertyvalue

property name/value pairs where known properties are:

Catalog

catalog value to match

Schema

schema value to match

Outputs

data

a table containing the query result. Table columns are ’Catalog’, ’Schema’, ’Table’, ’Columns’, ’Type’.

Examples

Show all tables in the database.

 
 # create sql connection to an existing database
 db =  mysql("MySQLNative", "root", "matlab");
 # list all tables
 data = sqlfind(db, '');
 
 

Show information about TestTable

 
 # create sql connection
 db =  mysql("MySQLNative", "root", "matlab");
 # list matching tables
 data = sqlfind(db, 'TestTable');
 
 

See also: mysql, sqlread.