私は、SQL式をこのようPreparedStatement
にフィードする必要があるため、知っていますPreparedStatement
String updateStatement =
"update " + dbName + ".COFFEES " +
"set TOTAL = TOTAL + ? " +
"where COF_NAME = ?";
ただし、「?」を使用せずに完全な where 句を使用して update ステートメントをフィードすることはできますか?
例えば
String updateStatement =
"update " + dbName + ".COFFEES " +
"set TOTAL = TOTAL + ? " +
"where COF_NAME = 'aaa";
関数のパラメーターとしてを取得するだけの理由でありwhere
、文字列を解析して分割するのは効率的ではないと思います。