1 - Using SQL there exists an SQLIte function typeof(x) where x can be a column name and it will return the type which is specific
to the affinity and not to the original specified type when creating the table. If on the other hand you simply wish to know which
type supports which affinity, this is well-documented in the SQLite site.
http://www.sqlite.org/datatype3.html#affname
2 - The affinity does not really control how the data is stored, so it does not matter - it does however control (or shall I use the
words "suggests strongly") how the output will be formatted. Numeric types are most notably used with Date/Time values which have
proper text representation and formats but gets added to, subtracted from and generally modified in mathematical ways. (That's the
short version, there are more to be said about it you can see the online docs).
BLOB values on the other hand has no type, and no affinity - the SQL processor makes no attempt to work with them, modify or format
them for any output (unless specifically requested via functions). The bytes get written/read straight into / out of the data files.
Quite useful and quite quick - it DOES however require some bit of extra processing from your software, most notably having to Set
an initial blob of n length into the db (fo which there are ver nice zeroblob() etc. functions) and then writing to that blob only
the exact bytelengths specifed, etc. It's very well documented and very worth the effort.
On 2013/07/02 13:15, techi eth wrote:
Few Query :
1) Is their any function or Method to get Affinity type associated
with colum.
2) I understand Integer,Text & Float could satisfy all data
type requirement.In that case where i can use blob Or Numeric type.
Cheers -
Techi
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users