I wrote a Insert statement that uses parameters. There seems to be 3 ways to specify the parameters:
Method 1:
INSERT INTO table (a, b) VALUES (?, ?), (?, ?)
Method 2:
INSERT INTO table (a, b) VALUES (:p1, :p2), (:p3, :p4)
Method 3:
INSERT INTO table (a, b) VALUES (@p1, @p2), (@p3, @p4)
Which is the right (or recommended) way to do it? Also if the sql command has hundreds of parameters, I noticed that (1) is the fastest while (3) is the slowest. Why is that?
Thanks,
Hengyi