// My code turns ' ' to NULL now ResultSet r = select.executeQuery ("SELECT rtrim(test_val) FROM test");