statement for npgsql using parameter
问题 I pass the parameters in the sql query using the driver npgsql: SqlCommand = new NpgsqlCommand(); .... SqlCommand.CommandText = "SELECT id,name FROM table1 WHERE field1=:param2 ORDER BY name;"; SqlCommand.Parameters.AddWithValue("param2", 1); This query executed correctly and issued the necessary data, but as soon as I add parameter to the sql in the section "select" SqlCommand.CommandText = "SELECT id,name :param1 FROM table1 WHERE field1=:param2 ORDER BY name;"; SqlCommand.Parameters