Run SQL Query

SQL statement to import data into the MATLAB® workspace

Database Toolbox™ lets you create SQL queries either by building them visually using the Database Explorer app or by writing them using SQL. To import data into the MATLAB workspace, run a SQL query and retrieve the data.


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


Database Explorer Configure, explore, and import database data

Using Objects

DatabaseDatastore Access collection of data stored in database
Was this topic helpful?