code: public boolean existsView(final Connection _con,
                                final String _viewName)
          throws SQLException
      {
          boolean ret = false;
  
          final DatabaseMetaData metaData = _con.getMetaData();
  
          // first test with lower case
          final ResultSet rs = metaData.getTables(null, null, _viewName.toLowerCase(), new String[] { "VIEW" });
          if (rs.next()) {
              ret = true;
          }
          rs.close();
  
          // then test with upper case
          if (!ret) {
              final ResultSet rsUC = metaData.getTables(null, null, _viewName.toUpperCase(), new String[] { "VIEW" });
              if (rsUC.next()) {
                  ret = true;
              }
              rsUC.close();
          }
  
          return ret;
      }
docs: The method tests, if a view with given name exists.
  
  @param _con sql connection
  @param _viewName name of view to test
  @return <i>true</i> if view exists, otherwise <i>false</i>
  @throws SQLException if the exist check failed