Name
foreign_key_list — List all foreign keys in the given table
Common Usage
PRAGMA [database
.]foreign_key_list(table_name
);
Description
The foreign_key_list
pragma lists all the foreign
key references that are part of the specified table. That list
will contain one row for each column of each foreign key
contained within the table.
Column name | Column type | Meaning |
---|---|---|
id
| Integer | Foreign key ID number |
seq
| Integer | Column sequence number for this key |
table
| Text | Name of foreign table |
from
| Text | Local column name |
to
| Text | Foreign column name |
on_update
| Text | ON
UPDATE action |
on_delete
| Text | ON
DELETE action |
match
| Text | Always NONE |
See Also
Get Using SQLite now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.