- what is the maximum value of data type INTEGER in sqlite3 ?
- How do you store ip address in database ?
- What is attached ?
- How to create table which belongs to a specific database using sql ddl?
- What is this error about ?
error while the list of system catalogue : no such table: temp.sqlite_master Unable to execute statement
- Does sqlite3 text data type supoports unicode? Thanks.
in general check out the sqlite documentation
Yes and no.
Yes in that SQLite lets you store
TEXT
data in UTF-8 or UTF-16. (Use PRAGMA ENCODING to choose the internal format.)No in that the built-in
LOWER
andUPPER
functions only affect ASCII characters. But you can redefine functions and collations to add this support. There's an ICU extension to SQLite that does this.The easiest way is to store the string form (e.g., “
127.0.0.1
” or “::1
”) since then you can read them manually and reparsing to an address structure (if you have to) is easy. SQLite likes strings (which use the TEXT type) and handles them efficiently.Regarding the second question:
You can store IP address in DB in 2 ways:
from http://www.sqlite.org/datatype3.html
Unless you have some other reason not to, you can store IP address using TEXT.