2 rows

View and edit SQL

pk ▼ foreign_key_with_label foreign_key_with_blank_label foreign_key_with_no_label foreign_key_compound_pk1 foreign_key_compound_pk2
1 hello 1 - 3 1 a b
2          

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE foreign_key_references (
  pk varchar(30) primary key,
  foreign_key_with_label varchar(30),
  foreign_key_with_blank_label varchar(30),
  foreign_key_with_no_label varchar(30),
  foreign_key_compound_pk1 varchar(30),
  foreign_key_compound_pk2 varchar(30),
  FOREIGN KEY (foreign_key_with_label) REFERENCES simple_primary_key(id),
  FOREIGN KEY (foreign_key_with_blank_label) REFERENCES simple_primary_key(id),
  FOREIGN KEY (foreign_key_with_no_label) REFERENCES primary_key_multiple_columns(id)
  FOREIGN KEY (foreign_key_compound_pk1, foreign_key_compound_pk2) REFERENCES compound_primary_key(pk1, pk2)
);