Skip to content

Bit #42

In Go, the syntax for SQL parameter placeholder differs depending on your database. MySQL, SQL Server and SQLite use the ? notation, but PostgreSQL uses the $N notation.

For example:

-- MySQL
INSERT INTO ... VALUES (?, ?, ?);
-- PostgreSQL
INSERT INTO ... VALUES ($1, $2, $3);