 <p>[EDIT: Irrelevant suggestion about SQLite 3.7.11 removed]</p> <p>You could use insert-select with the user id as a literal:</p> <pre><code>INSERT OR IGNORE INTO messages_seen (message_id, user_id) SELECT message_id, 4 FROM messages WHERE mb_topic_id = 7 </code></pre>