SQLite 如何声明为字节数组? [英] SQLite how to declare as Byte Array?

查看:24
本文介绍了SQLite 如何声明为字节数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 SQLite 数据库.我想创建一个字段并将其声明为字节数组类型,但我不知道 SQLite 将什么称为字节数组类型的东西.我该怎么做?

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. How would I do this?

推荐答案

您正在寻找 BLOB.

来自网页:

BLOB - 该值是一组数据,完全按照输入的方式存储.

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

这是一个制作包含两列的表格的示例 - 一个 id 和一些数据,这是一个 BLOB:

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

这篇关于SQLite 如何声明为字节数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆