On Sunday, 12 February, 2017 11:03, Domingo Alvarez Duarte <mingo...@gmail.com> 
wrote:

> Hello Keith !
 
> You can try this that works:
 
> select m.name       as TableName,
>         i.cid        as ColumnID,
>         i.name       as ColumnName,
>         i.type       as Affinity,
>         i."notnull"    as CanBeNull,
>         i.dflt_value as DefaultValue,
>         i.pk         as PrimaryKeySeq
>    from sqlite_master as m,
>         pragma_table_info(m.name) as i
>   where m.type='table';

Yes, I am aware that it works if you quote the apparently reserved word 
"notnull".  That is however ugly beyond belief and quoted identifiers make my 
eyes bleed (just like Perl :) ).  It would be nice if the default column name 
were not a reserved word ...
 
> On 12/02/17 15:24, Keith Medcalf wrote:
> > select m.name       as TableName,
> >         i.cid        as ColumnID,
> >         i.name       as ColumnName,
> >         i.type       as Affinity,
> >         i.notnull    as CanBeNull,
> >         i.dflt_value as DefaultValue,
> >         i.pk         as PrimaryKeySeq
> >    from sqlite_master as m,
> >         pragma_table_info(m.name) as i
> >   where m.type='table';
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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

Reply via email to