Is there a way to get the column data types for a view in SQLITE?
I used the PR开发者_运维知识库AGMA table_Info('table_name') to get the table names,field data type and other info about the table,it's giving me the expected values but when it comes to views the field data type returned is always "numeric". What might be the cause of this problem?...Is there other ways to get the field data type from a view? please help
I'm guessing it's a by-product of the fact that columns aren't really strongly typed in SQLite. While you can declare a type for a column, it won't prevent you from putting data of other types into that column. In other words, the data type is associated with the individual field rather than the column it's in. The specifics of how types are determined vary a bit depending on which version of SQLite you're using:
SQLite 2: http://www.sqlite.org/datatypes.html
SQLite 3: http://www.sqlite.org/datatype3.html
精彩评论