Don't forget about this handy pragma:

PRAGMA schema.table_info(table-name);

This pragma returns one row for each column in the named table.
Columns in the result set include the column name, data type, whether
or not the column can be NULL, and the default value for the column.
The "pk" column in the result set is zero for columns that are not
part of the primary key, and is the index of the column in the primary
key for columns that are part of the primary key.

The table named in the table_info pragma can also be a view.



On 11/2/17, Hick Gunter <h...@scigames.at> wrote:
> If an entry refers to an index, the field "name" will contain the name of
> the index, while the field "tbl_name" contains the name of the table the
> index refers to.
>
> -----Urspr√ľngliche Nachricht-----
> Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im
> Auftrag von Igor Korot
> Gesendet: Donnerstag, 02. November 2017 04:37
> An: Discussion of SQLite Database <sqlite-users@mailinglists.sqlite.org>;
> General Discussion of SQLite Database <sqlite-us...@sqlite.org>
> Betreff: [EXTERNAL] [sqlite] sqlite_master structure
>
> Hi, ALL,
> I see that sqlite_master have 2 fields: name and tbl_name. It looks like
> they have the same value in my case.
>
> Is there a scenario when those 2 are different?
> And what should I check for the "table name"?
>
> Thank you.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___________________________________________
>  Gunter Hick | Software Engineer | Scientific Games International GmbH |
> Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O)
> +43 1 80100 - 0
>
> May be privileged. May be confidential. Please delete if not the addressee.
> _______________________________________________
> 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