The FOREIGN KEY clause specifies the columns in the child table that refers to primary key columns in the parent table. You can put a foreign key name after FOREIGN KEY clause or leave it to let MySQL to create a name for you. Notice that MySQL automatically creates an index with the foreign_key_name name.