On 4/17/2014 6:24 PM, David Clark wrote:
If I have a table of
field1 varchar(25)
field2 varchar(50)
field3 varchar(75)

I know sqlite does not enforce limits, but in my program it would be useful if 
I could find the declared lengths of
25, 50 and 75 in this case.  How might I do that in sqlite?

Prepare a SELECT statement selecting these columns (you don't need to actually run it), and call sqlite3_column_decltype[16] for each column. That gives you raw text from the original CREATE TABLE statement. You can use "select * from mytable;" to do that for all columns (complete with sqlite3_column_name[16]).
--
Igor Tandetnik

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

Reply via email to