Trouble executing a MySQL delete statement in Java

后端 未结 6 1806
旧时难觅i
旧时难觅i 2021-01-14 12:41

I am trying to have this code run and delete a certain record in a MySQL database but I get this error:

SQLException: Can not issue data manipulation stateme         


        
6条回答
  •  太阳男子
    2021-01-14 13:01

    Use execute instead of executeQuery.

    As far as I know, executeQuery must be used if you are executing a query that returns a resultset (select for example).

提交回复
热议问题