How to dump a file stored in a sqlite database as a blob?

前端 未结 4 693
慢半拍i
慢半拍i 2020-12-13 06:32

I have a sqlite3 database. One column has the TEXT type, and contains blobs which I would like to save as file. Those are gzipped files.

The output of the command

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 07:15

    You can use writefile if using the sqlite3 command line tool:

    Example usage: select writefile('blob.bin', blob_column) from table where key='12345';

提交回复
热议问题