Jak wstawić NULL w mysql, zwłaszcza INT dataType

Mam 80000 recodes, które trzeba wstawić do bazy danych, szczególnie w tabeli: temp (ts, temp) temp to INT.

Problem jest prawie 20000 recodes są null, więc zastanawiam się, jak wstawić NULL do DB, gdy dataType jest INT.

Próbowałem tego:

String val = null;

//insert(ts, val) into temp 
String sql = "INSERT INTO temp" + "(val)" + " VALUES" + "('" + val + "')";
Statement st = (Statement) conn.createStatement();
count  = st.executeUpdate(sql);

niestety wkładka jest nieudana. Wydrukuj komunikat wyjątku:

Incorrect integer value: 'null' for column 'val' at row 1"

Chciałbym, żeby ktoś mi w tym pomógł. Dziękuję Ci.

questionAnswers(6)

yourAnswerToTheQuestion