I am trying to insert binary data into blob using SQLite3 shell, which means regular SQL statements. Here is my table:
CREATE TABLE MYTABLE (ID INTEGER, BINDATA BLOB NOT NULL, SOMEFK INTEGER REFERENCES OTHERTABLE(ID) NOT NULL, PRIMARY KEY(ID) );
And here is what the insert statement I am trying is:
INSERT INTO MYTABLE (BINDATA, SOMEFK) VALUES (__READBINDATA('/tmp/somefile'), 1);
With __READBINDATA(file) is the function I'm looking for. Is it possible?
source share