Fk In Insert Mysql

[Solved] Fk In Insert Mysql | Sql - Code Explorer | yomemimo.com
Question : fk in insert mysql

Answered by : giamblers

INSERT INTO joke(joke_text, joke_date, author_id)
VALUES (‘Humpty Dumpty had a great fall.’, ‘1899–03–13’, (SELECT id FROM author WHERE author_name = ‘Famous Anthony’));

Source : https://codeburst.io/insert-with-select-statement-for-columns-with-foreign-key-constraint-in-mysql-with-examples-f9ab57c8e4dd | Last Update : Tue, 24 Nov 20

Answers related to fk in insert mysql

Code Explorer Popular Question For Sql