On Mon, Nov 16, 2015 at 11:20 AM, R Smith <rsmith at rsweb.co.za> wrote:
> On 2015/11/16 7:59 PM, Igor Korot wrote: >> >> BTW, are only name, type and pk fields are guaranteed to have a value? >> > > Nothing is guaranteed to have a value unless created with NOT NULL in the > field specification in the CREATE TABLE schema SQL. > > Usually (in most DBs) a Primary key is guaranteed to not have NULL values, > but in SQLite it is permissible if the PK is not specifically stated to be > NOT NULL. I'll go one further - since this is the results from a PRAGMA call, IMHO you should make no assumptions at all about whether any of the return values can be NULL. PRAGMA are entirely non-standard, and unless something is specifically guaranteed the outcome is open to changes due to future implementation changes. -scott

