connection
Relational database ODBC connection
Description
Create a database connection using an ODBC driver. For details about ODBC drivers and the alternative JDBC drivers, see Choose Between ODBC and JDBC Drivers.
You can use the connection object to connect to various databases using
different drivers that you install and administer. For details, see Connect to Database.
Properties
Object Functions
close | Close and invalidate database and driver resource utilizer |
commit | Make database changes permanent |
execute | Execute SQL statement using relational database connection |
fetch | Import data from execution of SQL statement |
fetchmulti | Import data from SQL queries |
isopen | Determine if database connection is open |
rollback | Undo database changes |
executeSQLScript | Execute SQL script on database |
select | Execute SQL SELECT statement and import
data into MATLAB |
sqlfind | Retrieve metadata about database objects |
sqlinnerjoin | Perform inner join on two database tables |
sqlouterjoin | Perform outer join on two database tables |
sqlread | Import table data from database |
sqlwrite | Insert MATLAB data into database table |
sqlupdate | Update rows in database table |
update | Replace data in database table with MATLAB data |
Examples
Alternative Functionality
You can connect to an SQLite database file by creating the sqlite object. This connection uses the MATLAB interface to SQLite that does not require installing or administering a database
or driver. For details, see Interact with Data in SQLite Database Using MATLAB Interface to SQLite.
Version History
Introduced before R2006a