I want to insert records into the "books" table for every author in the "author" table. In other words, if this represented the author table:
> 1 - "Herman Melville"
> 2 - "Stephen King"
> 3 - "Truman Capote"
...then, the insert would yield these results in the "book" table:
> 'Hello World' - 1
> 'Hello World' - 2
> 'Hello World' - 3
I have the following INSERT statement (it's actually a crude example, but it demonstrates the objective):
INSERT INTO books (title, author_id) VALUES ('Hello World', SELECT id FROM author);
Unfortunately, this fails and I'm uncertain how to get each of the "id" values from the "author" table.