Documentation

Database Toolbox Functions

Alphabetical List By Category

Database Connection

Open and Close Database Connection

close Close database connection, SQLite connection, DatabaseDatastore, cursor, or resultset object
database Connect to database
isopen Determine if database connection or database cursor is open
isreadonly Determine if database connection is read only
logintimeout Set or get time allowed to establish database connection
ping Retrieve status information about database connection
set Set properties for database, cursor, or drivermanager object
setdbprefs Set preferences for retrieval format, errors, NULLs, and more
close Close database connection, SQLite connection, DatabaseDatastore, cursor, or resultset object
sqlite Create SQLite connection

View Information About Database

catalogs Get database catalog names
columns Return database table column names
schemas Get database schema names
tables Return database table names
get Retrieve object properties
getdatasources Return names of ODBC and JDBC data sources on system
isopen Determine if database connection or database cursor is open
isreadonly Determine if database connection is read only
ping Retrieve status information about database connection
columnprivileges List database column privileges
columns Return database table column names
dmd Construct database metadata object
exportedkeys Retrieve information about exported foreign keys
importedkeys Return information about imported foreign keys
indexinfo Return indices and statistics for database tables
primarykeys Get primary key information for database table or schema
procedurecolumns Get stored procedure parameters and result columns of catalogs
procedures Get stored procedures for catalogs
supports Detect whether property is supported by database metadata object
tableprivileges Return database table privileges
tables Return database table names

Data Import into MATLAB

Run SQL Query

exec Execute SQL statement and open cursor
fetch Import data into MATLAB workspace from cursor object or from execution of SQL statement
fetchmulti Import data from multiple resultsets
get Retrieve object properties
resultset Construct resultset object
rsmd Construct resultset metadata object
runsqlscript Run SQL script on database
runstoredprocedure Call stored procedure with and without input and output arguments
set Set properties for database, cursor, or drivermanager object
datastore Create datastore to access collection of data in a database
DatabaseDatastore Access collection of data stored in database

View Information About Imported Data

attr Retrieve attributes of columns in fetched data set
cols Retrieve number of columns in fetched data set
columnnames Retrieve names of columns in fetched data set
get Retrieve object properties
namecolumn Map resultset column name to resultset column index
querytimeout Get time specified for SQL queries to succeed
rows Return number of rows in fetched data set
set Set properties for database, cursor, or drivermanager object
width Return field size of column in fetched data set

Data Export from MATLAB

commit Make database changes permanent
datainsert Export MATLAB data into database table
fastinsert Add MATLAB data to database table
insert Add MATLAB data to database tables
rollback Undo database changes
update Replace data in database table with MATLAB data
Was this topic helpful?