我正在尝试运行一个基本上如下所示的查询:
INSERT INTO lessons_skills_xref (lessons_id, skills_id)
SELECT id FROM lessons, (SELECT id FROM skills WHERE title = "title 1")
/* PSEUDO CODE - Where the ids for both lesson and skill don't already exist */
不知道如何完成最后一部分。有任何想法吗?