Main Content

Data Type Support

You can import these data types into the MATLAB® workspace and export them back to your database.

DatabaseSupported Data Type

All databases

  • BOOLEAN

  • CHAR

  • DATE

  • DECIMAL

  • DOUBLE

  • FLOAT

  • INTEGER

  • NUMERIC

  • REAL

  • SMALLINT

  • TIME

  • TIMESTAMP

    Note

    When importing TIMESTAMP data into MATLAB, you can get an incorrect value at the daylight saving time change. To avoid an incorrect value, convert TIMESTAMP data to strings in your SQL query. Then, convert the strings back to the MATLAB data type you want. Or, connect to your database using a different driver.

Microsoft® SQL Server®

  • NTEXT

  • TEXT

  • VARCHAR(MAX)

  • CHAR(8000)

  • NCHAR(4000)

  • NVARCHAR(MAX)

  • TINYINT

MySQL®

  • MEDIUMTEXT

  • LONGTEXT

  • TINYINT

Oracle®

  • LONG

  • VARCHAR2(4000)

  • NCHAR(2000)

  • NVARCHAR2(4000)

To import data of another data type, manipulate the data before importing it into the MATLAB workspace. For details, see your database documentation.

See Also

| |

Related Topics