com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '' for key 'PRIMARY'
问题 I am getting this exception from today onwards. Yesterday things were fine. I will post my code : public void enterStaff() throws ClassNotFoundException, SQLException { try { Class.forName("com.mysql.jdbc.Driver"); connect = DriverManager .getConnection("jdbc:mysql://localhost:3306/project?" + "user=root&password=virus"); statement = connect.createStatement(); preparedStatement = connect .prepareStatement("SELECT count(*)FROM information_schema.tables\n" + "WHERE table_schema = 'project' AND