They both do the same thing at the same speed, it's just a matter of which query is more convenient to write. I've had many situations where each one was the clear choice - you will too!
They are both equally effective - as Kieran said. The former has an advantage though, because you can insert multiple rows in one statement, whereas the latter can't. I.e.:
INSERT INTO mytable ( foo, bar ) VALUES ( 'foo1', 'bar1' ), ( 'foo2', 'bar2' );
They are both equally effective - as Kieran said. The former has an advantage though, because you can insert multiple rows in one statement, whereas the latter can't. I.e.:
INSERT INTO mytable ( foo, bar ) VALUES ( 'foo1', 'bar1' ), ( 'foo2', 'bar2' );
...provided the database supports this behavior. Not all do.