我正在尝试在C#中使用Update查询将多个列更新到Oracle数据库中,但我遇到了多个错误。你能帮我简化一下这个问题吗?
其中一个错误是
ERROR [NA000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-00927: missing equal sign
string OCommand = "UPDATE " + tableName + " SET (" + columns + ") = " + values + " WHERE CUSTOMERID = " + COLUMNS_CUSTOMERID + "";
OdbcCommand cmd = new OdbcCommand(OCommand);
cmd.CommandType = System.Data.CommandType.Text;
cmd.Connection = connection;
connection.Open();
cmd.ExecuteNonQuery();
connection.Close();
答案 0 :(得分:0)
您应该独立设置每个列值。例如:
for ($i = 0; $i < count($towns); $i++){
echo "<li>".$towns[$i]."</li>";
}