Java PreparedStatement complaining about SQL syntax on execute()

前端 未结 6 1849
梦毁少年i
梦毁少年i 2020-12-21 06:20

This is driving me nuts... What am I doing wrong here?

ArrayList toAdd = new ArrayList();
toAdd.add(\"password\");
try{
    Prepa         


        
6条回答
  •  伪装坚强ぢ
    2020-12-21 07:00

    Prepared statements need to define a fixed structure so they can be precompiled. That means you can have variable values, but never variable table names, column names, function names etc.

提交回复
热议问题