开发者

SQLite how to declare as Byte Array?

开发者 https://www.devze.com 2023-01-07 17:03 出处:网络
I\'ve got a SQ开发者_Go百科Lite 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. How would I do t

I've got a SQ开发者_Go百科Lite 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. How would I do this?


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);


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

精彩评论

暂无评论...
验证码 换一张
取 消