INSERT INTO `table` VALUES ('val1','val2','val3')
INSERT INTO `table` SET a='val1',b='val2',c='val3'
Both are used for the same purpose.but which i should use? in which case? and why?
They are identical, but the first one is standard SQL. As the SQL parser treats them as synonyms there is no difference in performance, usage or anything. As always, prefer using the standardized form, the first syntax in this case, for portability and compatibility.
Refer to the SQL-92 standard syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With