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:

Java Code:
stmt.executeUpdate("INSERT INTO mytable VALUES('\\')");
Try the following for successful insertion:

Java Code:
stmt.executeUpdate("INSERT INTO mytable VALUES('\\\\')");