On Fri, Oct 24, 2008 at 2:49 AM, dbikash <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am using tinyint in my schema, but while doing paramterized insertion, I
> find that there is no specific bind API to insert a tinyint. So I used int
> sqlite3_bind_int() instead.
>
> However, the size of my database suggests that SQLite might actually be
> using 4 bytes instead of 1. Is it? How can I insert tinyint's in a
> parameterized query so that it takes only 1 byte of space?
>

sqlite only has a single integer type - there is no tinyint.  sqlite
stores integers in a variable-length encoding.  1 byte stores 7 bits,
2 stores 14 bits, etc.  9 bytes maximum.

-- 
Cory Nelson
http://www.int64.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to