Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
基本的に、私がやりたいことは次のとおりです。
INSERT INTO table ( column1, column2 ) VALUES ( ?, ? ) WHERE EXISTS ( SELECT 1 FROM table2 WHERE id = ? )
つまり、id が table2 に存在する場合、値を挿入する必要があります。それ以外の場合は何も起こりません。
このタスクの正しい構文は何ですか?