PRAGMA foreign_key_list
This pragma returns one row for each foreign key constraint created by a REFERENCES clause in the CREATE TABLE statement of table "table-name".
PRAGMA foreign_key_list(table-name);
On the sample database
What PRAGMA foreign_key_list(playlist_tracks) returns on the sample database, in SQLite 3.54.1 as built for the browser by sql.js:
| id | seq | table | from | to | on_update | on_delete | match |
|---|---|---|---|---|---|---|---|
| 0 | 0 | tracks | track_id | id | NO ACTION | NO ACTION | NONE |
| 1 | 0 | playlists | playlist_id | id | NO ACTION | CASCADE | NONE |
What the SQLite documentation says
This pragma returns one row for each foreign key constraint created by a REFERENCES clause in the CREATE TABLE statement of table "table-name".
From sqlite.org's pragma documentation for SQLite 3.54.1, in the public domain.