MATLAB: Can I not use truncate with the Database Toolbox

Why does executing an SQL truncate query generate an error in MATALB R2009b?

Best Answer

Connecting to SQL Server 2005 database and executing a truncate SQL query generates an error.
??? Error using ==> database.exec at 51
The statement did not return a result set.
Error in ==> test at 4
curs = exec(conn,sql_cmd)
This is a known limitation of the Database Toolbox in MATLAB R2009b and prior. The truncate operation is supported as of R2010a.
Related Question