On Wed, May 07, 2008 at 10:02:32AM -0700, Joanne Pham scratched on the wall:
> Hi All,
> I have read online document regarding SQLITE3 data type and below is 
> list of these datatypes:
>       * TEXT 
>       * NUMERIC 
>       * INTEGER 
>       * REAL 
>       * NONE 

  Those aren't datatypes, those are column type affinities (you can't
  have a value with the type "NONE").  There is a slight difference
  in SQLite, since individual values can have any datatype, but columns
  have only one affinity.

  Affinities are mostly used when trying to figure out how to covert
  string representations to native types and vise-versa.

> But just now I found out SQLITE3 has bigint and int as another datatype. 

  Part of SQLite's looser typing rules means that the parser will accept
  anything as the type in a CREATE TABLE statement.  If you create
  columns with the type "bigint" or "int" (or "MyVeryCoolIntType") all
  SQLite will see is the three letters "int" and mark the column as
  having an INTEGER type affinity.  Upon lacking specific information,
  anything that looks like in integer will be written into the column
  as an integer.

  All this is laid out here:

    http://www.sqlite.org/datatype3.html

> Can you direct me where I can find out the complete list of SQLITE 
> datatypes the size of each datatype.

  As the above docs spell out, the data storage sizes are:

  NULL          0 bytes
  INTEGER:      1, 2, 3, 4, 6, or 8 bytes, depending on value
  REAL          8 bytes
  TEXT          size of encoded string
  BLOB          size of blob

  There are per-value, not per-column (since a column can have
  different types).

    -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"'People who live in bamboo houses should not throw pandas.' Jesus said that."
   - "The Ninja", www.AskANinja.com, "Special Delivery 10: Pop!Tech 2006"
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to