Java PreparedStatement complaining about SQL syntax on execute()

前端 未结 6 1827
梦毁少年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 06:49

    You cannot submit an ALTER TABLE statement using parameters like this.

    I guess it is not permissible to execute DDL statements in Java PreparedStatement.

提交回复
热议问题