Search notes:

SQLite: blob datatype

A value whose data type is blob can be created with the functions zeroblob(n) and randomblob(n) or the «blob literal» x'…'.
A hexadecimal representation of the blob-value is returned by the functions hex(blob_value) or quote(blob_value).
create table t (
   c1,
   c2
);

insert into t values (zeroblob(5), x'deadbeef');

.mode column
.width 16 16
.header on
select
   hex  (c1) c1_hex  ,
   hex  (c2) c2_hex  ,
   quote(c1) c1_quote,
   quote(c2) c2_quote
from
   t;
--
-- c1_hex            c2_hex            c1_quote       c2_quote
-- ----------------  ----------------  -------------  -----------
-- 0000000000        DEADBEEF          X'0000000000'  X'DEADBEEF'
Github repository about-sqlite, path: /datatypes/blob/use.sql

See also

SQLite data types

Index