SQLite how to declare as a byte array?

I have a SQLite database. I would like to create a field and declare it as an array of type Byte, but I don’t know that SQLite calls what would be of type Byte Array. How should I do it?

+24
source share
2 answers

You are looking for a blob .

On the web page:

BLOB - A value is a block of data stored exactly as it was entered.

Here is an example of creating a table with two columns - an identifier and some data that is BLOB:

CREATE TABLE t1 (id INTEGER PRIMARY KEY, data BLOB); 
+42
source

To add information - the official BLOB, but when creating SQLite DB - this is Visual Studio, use the type "image", which is an alias for BLOB

+2
source

Source: https://habr.com/ru/post/1394633/


All Articles