Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

fk in insert mysql

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 by codeburst.io #
 
PREVIOUS NEXT
Tagged: #fk #insert #mysql
ADD COMMENT
Topic
Name
8+2 =