Since slash (\) is a escape character in Java and also in database, therefore inserting a string containing slash is tricky in Java. If you try the following, you will get an exception:
stmt.executeUpdate("INSERT INTO mytable VALUES('\\')");
Try the following for successful insertion:
stmt.executeUpdate("INSERT INTO mytable VALUES('\\\\')");