SQLite how to declare as Byte Array?

前端 未结 2 1584
日久生厌
日久生厌 2020-12-05 23:27

I\'ve got a SQLite database. I\'d like to create a field and declare it as type Byte array but I don\'t know what SQLite calls something that would be of type Byte Array. Ho

相关标签:
2条回答
  • 2020-12-05 23:43

    You're looking for BLOB.

    From the webpage:

    BLOB - The value is a blob of data, stored exactly as it was input.

    Here's an example of making a table with two columns - an id and some data, which is a BLOB:

    CREATE TABLE t1 (id INTEGER PRIMARY KEY, data BLOB);
    
    0 讨论(0)
  • 2020-12-06 00:00

    To add an info - official is BLOB, but when building SQLite DB is Visual studio, use type "image" which is the alias for BLOB

    0 讨论(0)
提交回复
热议问题