5
I say that because there are two ways.
Has the:
INSERT INTO teste SET nome = "Lucas", sobrenome = "Alves";
And also the way:
INSERT INTO teste (nome, sobrenome) VALUES ("Lucas", "Alves");
Speed, good practice, etc., has something to do with it, or is it all the same?
INSERT WITH SET I didn’t know.
– Sam
Neither, Dvdsamm, but I saw in the course of Bonieky he using, and it works the same way, then I was in doubt.
– Lucas de Carvalho
Bigger cool this. With SET is much better. On this site the guy even recommends using this syntax https://www.bennadel.com/blog/2913-using-the-insert-into-set-syntax-in-mysql.htm
– Sam
I thought it better too, when it comes to maintenance, it gets easier. But from what I understand, it only works in Mysql and derivatives, so if you need to migrate to another database in the future, then you have to update everything,
– Lucas de Carvalho
The syntax is the same as the UPDATE. It makes it much easier.
– Sam
Dude, I have a "damn" inheritance (I put it in quotes so it doesn’t look ungrateful, but I’m very grateful. It’s just a representation)... I learned SQL from a friend and I took his pattern and I never went too deep to know the variations. For me it was just what I learned from him. :)
– Sam
I do courses at Upinside and with Bonieky, the two are beasts, each has a different didactic, ai, one complements the other, to learning well.
– Lucas de Carvalho