2017-06-09 15 views

回答

2

在原始SQLite的查詢,一個blob可以寫成一個x -prefixed字符串,由兩位十六進制數representeded每個字節:

INSERT INTO MyTable(BlobColumn) VALUES(x'0123AB'); 

要返回BLOB從文本查詢時,您可以使用quote() function,它使用相同的格式:

SELECT quote(BlobColumn) FROM MyTable; --> returns the string "x'0123AB'" 

這可能是一個更好的主意,使用一些其他的SQLite3驅動程序MATLAB,例如,https://github.com/kyamagu/matlab-sqlite3-driverhttp://jaewon.mine.nu/jaewon/2015/06/17/another-sqlite-interface-for-matlab/

相關問題