executeUpdate() returns zero despite correct execution

前端 未结 3 1152
北恋
北恋 2021-01-25 18:10

create_PaperBean.java

package Beans;

import java.sql.SQLException;
import java.sql.Statement;
import java.util.loggin         


        
3条回答
  •  [愿得一人]
    2021-01-25 18:45

    st.executeUpdate() either returns the row count for SQL Data Manipulation Language (DML) statements or0 for SQL statements that return nothing.

    Creating a table is neither an INSERT nor an UPDATE, so it's normal to receive 0 as no row(s) were affected.

提交回复
热议问题